View previous topic :: View next topic |
Author |
Message |
TobiWan Apprentice


Joined: 07 Jul 2003 Posts: 275 Location: Brussels, Old Europe
|
Posted: Sun Aug 07, 2005 3:23 pm Post subject: [SOLVED] Yet another mount/umount permission question |
|
|
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!
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 |
|
 |
PaveQ Apprentice

Joined: 11 Feb 2005 Posts: 225 Location: Finland
|
Posted: Sun Aug 07, 2005 3:47 pm Post subject: |
|
|
Maybe you could try to add user option to fstab? |
|
Back to top |
|
 |
TobiWan Apprentice


Joined: 07 Jul 2003 Posts: 275 Location: Brussels, Old Europe
|
Posted: Sun Aug 07, 2005 3:55 pm Post subject: |
|
|
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.
regards,
Tobias _________________ Killing for peace is like fucking for virginity. |
|
Back to top |
|
 |
Joffer Guru


Joined: 10 Sep 2002 Posts: 585 Location: Arendal, Norway
|
Posted: Sun Aug 07, 2005 4:43 pm Post subject: |
|
|
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 |
|
 |
TobiWan Apprentice


Joined: 07 Jul 2003 Posts: 275 Location: Brussels, Old Europe
|
Posted: Sun Aug 07, 2005 5:13 pm Post subject: SOLVED |
|
|
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 |
|
 |
|
|
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
|
|