LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   fstab ignores user option (Debian Squeeze) (http://www.linuxquestions.org/questions/linux-newbie-8/fstab-ignores-user-option-debian-squeeze-779681/)

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:
Code:

UUID=b122b277-e085-4f50-9ddf-051efd89e
        /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:

Code:

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

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

Cheers,
Mike.

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?

Cheers,

Evo2.

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
/usr/lib/gvfs/gvfs-hal-volume-monitor

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

Cheers,
Mike.

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:
POLICY
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:
UUID=b122b277-e085-4f50-9ddf-051efd89e
/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 04:52 PM.