-   Linux - Newbie (
-   -   fstab ignores user option (Debian Squeeze) (

mike11 01-04-2010 03:48 AM

fstab ignores user option (Debian Squeeze)
Trying to set my fstab so I can mount an external USB HD as a normal (non-root) user. Here's the relevant fstab line:

        /media/usbhd                ext3                noauto,user,rw,exec,noatime,nodiratime                0        0

When I plug the USB HD into the usb it automount but without the user flag. The relevant line from mount is:


/dev/sdc1 on /media/usbhd type ext3 (rw,nosuid,nodev,noatime,nodiratime)
and unmount /media/usbhd:

umount: only root can unmount UUID=b122b277-e085-4f50-9ddf-051efd89e from /media/usbhd
Any ideas?.


evo2 01-04-2010 04:23 AM

I'll take a guess here that you are using gnome, and that gnome-volume-manger needs its settings tweaked.

Have you tried firing up gconf-editor and having a poke around?



jschiwal 01-04-2010 05:15 AM

The "user" option qualifies who can mount the filesystem, not how it is mounted.

Also, if your distro uses PolicyKit, the mount command may not be suid root and the system may rely on udev/hal/polkit to control who can mount or umount partitions, by changing the acl on the device node.

On my system (openSuSE) the system is setup where a usb drive is automounted unless there is an entry in /etc/fstab.
On Ubuntu, the system edits the /etc/fstab entry dynamically.

mike11 01-04-2010 06:14 PM

Thanks all for replying.

Gnome-volume-manager doesn't seem to contain anything which'll solve my problem.

ps x|grep hal gives

so it seems hal is running. How do I configure hal/udev to mount the media as a normal user?.


craigevil 01-04-2010 06:24 PM

Try using pmount or install usbmount

mike11 01-06-2010 09:04 PM

Thanks for replying.
usbmount and pmount are already running on my machine. man pmount gives:
The mount will succeed if all of the following conditions are met:

device is a block device in /dev/

device is not in /etc/fstab (if it is, pmount executes mount device as the calling user to handle this transparently). See below for more details.

so pmount won't handle devices having an entry in fstab, but the latter is exactly what I want.

Update: have cracked it. I can umount as a user after replacing option `user' with `users' in fstab:
/media/usbhd ext3 noauto,users,rw,exec,noatime,nodiratime 0 0

though it's not clear why this is so. The `user' option should have been fine.

All times are GMT -5. The time now is 01:41 PM.