LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices

Reply
 
Search this Thread
Old 01-04-2010, 03:48 AM   #1
mike11
Member
 
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:
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.
 
Old 01-04-2010, 04:23 AM   #2
evo2
Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,370

Rep: Reputation: 1173Reputation: 1173Reputation: 1173Reputation: 1173Reputation: 1173Reputation: 1173Reputation: 1173Reputation: 1173Reputation: 1173
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.
 
Old 01-04-2010, 05:15 AM   #3
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
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
mike11
Member
 
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
/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.
 
Old 01-04-2010, 06:24 PM   #5
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid
Posts: 4,733
Blog Entries: 12

Rep: Reputation: 456Reputation: 456Reputation: 456Reputation: 456Reputation: 456
Try using pmount or install usbmount
 
Old 01-06-2010, 09:04 PM   #6
mike11
Member
 
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:
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.

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


Reply


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


All times are GMT -5. The time now is 03:19 AM.

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