Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Yet another mount/umount permission question
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
TobiWan
Apprentice
Apprentice


Joined: 07 Jul 2003
Posts: 275
Location: Brussels, Old Europe

PostPosted: Sun Aug 07, 2005 3:23 pm    Post subject: [SOLVED] Yet another mount/umount permission question Reply with quote

Hi everybody,

I'm using HAL in combination with KDE 3.4.1 to automatically mount my USB storage devices. When I plug them in, they get mounted automatically and I can access them using Konqueror in the media tab. So far so good.

The problem is I can't umount them in Konqueror by right-clicking and choosing "Safely Remove". If I do, I get

Quote:

umount: only root can unmount /dev/sdb1 from /media/CNMEMORY1
Please check that the disk is entered correctly.


This is the line that gets added to /etc/fstab after the device is mounted automatically:

Quote:

/dev/sdb1 /media/CNMEMORY1 vfat user,exec,noauto,utf8,noatime,sync,managed 0 0


This is the entry in /etc/mtab that corresponds to the /etc/fstab entry:

Quote:

/dev/sdb1 /media/CNMEMORY1 vfat rw,nosuid,nodev,sync,noatime,utf8,umask=0007,gid=100 0 0


How do I solve this? I'm guessing I have to investigate HAL settings but I don't know where to look.

BTW: The same problem persists in GNOME.

EDIT: When I manually umount the device using sudo the entry in /etc/mtab is removed while the entry in /etc/fstab remains. I have to remove this line manually before I'm able to plugin the USB stick again.

thanks for pointers or better yet detailed instructions for dummies! :D

Tobias
_________________
Killing for peace is like fucking for virginity.


Last edited by TobiWan on Sun Aug 07, 2005 9:07 pm; edited 2 times in total
Back to top
View user's profile Send private message
PaveQ
Apprentice
Apprentice


Joined: 11 Feb 2005
Posts: 225
Location: Finland

PostPosted: Sun Aug 07, 2005 3:47 pm    Post subject: Reply with quote

Maybe you could try to add user option to fstab?
Back to top
View user's profile Send private message
TobiWan
Apprentice
Apprentice


Joined: 07 Jul 2003
Posts: 275
Location: Brussels, Old Europe

PostPosted: Sun Aug 07, 2005 3:55 pm    Post subject: Reply with quote

PaveQ wrote:
Maybe you could try to add user option to fstab?


That's the point. Any addition to /etc/fstab is useless since it gets created in realtime by HAL. I need to tell HAL how to create /etc/fstab entries rather than make them myself. That's the whole point and I simply don't know how. :wink:

regards,
Tobias
_________________
Killing for peace is like fucking for virginity.
Back to top
View user's profile Send private message
Joffer
Guru
Guru


Joined: 10 Sep 2002
Posts: 585
Location: Arendal, Norway

PostPosted: Sun Aug 07, 2005 4:43 pm    Post subject: Reply with quote

Is your user in the disk group?
Code:
gpasswd -a <username> disk

_________________
As of April 2006 - Athlon64 X2 4200+ 1GB RAM - amd64-2006.0 profiled system with portage 2.1_preX, ck-sources-2.6.16, glibc-2.4-r1 (overlay w/-Bdirect&-hashvals), binutils-2.16.91.0.6 (overlay), gcc-4.1, Xorg 7
Back to top
View user's profile Send private message
TobiWan
Apprentice
Apprentice


Joined: 07 Jul 2003
Posts: 275
Location: Brussels, Old Europe

PostPosted: Sun Aug 07, 2005 5:13 pm    Post subject: SOLVED Reply with quote

Hi there,

I solved it using this thread.

Summary:

Edit /usr/share/hal/fdi/90defaultpolicy/storage-policy.fdi and change:

Code:
<merge key="storage.policy.default.mount_option.user" type="bool">true</merge>


to

Code:
<merge key="storage.policy.default.mount_option.user[b]s[/b]" type="bool">true</merge>


and restart hald:

Code:

# /etc/init.d/hald restart


The problem is this: when hald mounts devices it does not mount these devices as a user who is currently logged into the machine but as the user the daemon is running under. The 'user' option in /etc/fstab does allow only for the user who mounted the device to unmount it (or root). By changing 'user' to 'users' hald creates /etc/fstab entries with the 'users' option. Now any user can umount devices.

This should be fixed in the ebuilds for hald and ivman imho.

regards,
Tobias
_________________
Killing for peace is like fucking for virginity.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum