You are not logged in.

#1 2006-05-31 13:24:04

nobby_trussin
Member
Registered: 2006-05-31
Posts: 10

user option in fstab not allowing non-root to mount drives

Hi, when i try to mount my drives, mount says "only root can do that". they mount fine as root but i thought putting the user option in fstab meant any user can mount that device. My fstab is as follows

/dev/dvd               /mnt/dvd  udf       ro,user,noauto,unhide   0      0
/dev/hdb1             /mnt/win ntfs       user,umask=022           0      0

i looked at the /dev devices - dvd is just a symlink to hdc. Please bear in mind i am a member of both disk and optical groups

brw-rw----  1 root disk     3, 65 2006-05-31 10:31 hdb1
brw-rw----  1 root optical 22, 0 2006-05-31 10:31 hdc

Hope someone can clear this up for me as its not good being root all the time

Thanks

Dan

Offline

#2 2006-05-31 17:01:26

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: user option in fstab not allowing non-root to mount drives

Try this in /etc/fstab:
/dev/dvd     /mnt/dvd  iso9660   ro,user,noauto   0      0
it should work.

Offline

#3 2006-05-31 18:06:19

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: user option in fstab not allowing non-root to mount drives

nobby_trussin wrote:

Hi, when i try to mount my drives, mount says "only root can do that". they mount fine as root but i thought putting the user option in fstab meant any user can mount that device. My fstab is as follows

/dev/dvd               /mnt/dvd  udf       ro,user,noauto,unhide   0      0
/dev/hdb1             /mnt/win ntfs       user,umask=022           0      0

What is the exact command you are trying? As user, you must only specify either the device or the mountpoint, never both (specifying both will result in the exact error message you quoted).

i looked at the /dev devices - dvd is just a symlink to hdc. Please bear in mind i am a member of both disk and optical groups

brw-rw----  1 root disk     3, 65 2006-05-31 10:31 hdb1
brw-rw----  1 root optical 22, 0 2006-05-31 10:31 hdc

You don't need read and/or write permissions to the devices to mount them. While being in optical may prove useful for some tasks, being a member of disk is useless and irresponsible. You could read the whole filesystem (including files owned by root) and even overwrite or manipulate the whole thing without root privileges. This is a big security risk.

Offline

#4 2006-06-01 12:13:47

nobby_trussin
Member
Registered: 2006-05-31
Posts: 10

Re: user option in fstab not allowing non-root to mount drives

thanks it works now

i was doing mount /dev/hdb1 /mnt/win.

when i do mount /mnt/win it works fine. pretty stupid that you can do it one way but not the other

thanks again

Dan

Offline

Board footer

Powered by FluxBB