Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-04-2010, 03:48 AM   #1
Registered: Apr 2009
Posts: 222

Rep: Reputation: 17
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?.

Old 01-04-2010, 04:23 AM   #2
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
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?


Old 01-04-2010, 05:15 AM   #3
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.

Last edited by jschiwal; 01-04-2010 at 05:19 AM.
Old 01-04-2010, 06:14 PM   #4
Registered: Apr 2009
Posts: 222

Original Poster
Rep: Reputation: 17
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?.

Old 01-04-2010, 06:24 PM   #5
Senior Member
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid/RPIOS
Posts: 4,889
Blog Entries: 28

Rep: Reputation: 535Reputation: 535Reputation: 535Reputation: 535Reputation: 535Reputation: 535
Try using pmount or install usbmount
Old 01-06-2010, 09:04 PM   #6
Registered: Apr 2009
Posts: 222

Original Poster
Rep: Reputation: 17
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.

Last edited by mike11; 01-06-2010 at 10:17 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
auto mount home from network and login as user on Debian OS - tried /etc/fstab emma_m Linux - Software 3 07-16-2009 09:38 AM
FC 5 install boot ignores ide=nodma option iusedtobeafox Fedora - Installation 2 04-14-2006 06:09 AM
Does Samba ignores the mount 'quiet' option? Woodsman Slackware 4 12-22-2005 10:26 PM
/etc/fstab "user" option: not working?! Sinope Linux - Newbie 6 09-15-2004 07:21 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:39 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration