View previous topic :: View next topic |
Author |
Message |
c707176 Apprentice
Joined: 01 Mar 2005 Posts: 215
|
Posted: Sun Mar 18, 2007 3:26 pm Post subject: [solved] mount usb only works as root |
|
|
Hi,
I followed the USB howto guide and got my USB storage device working. However, I can only mount it as root which is not so nice although I included the user flag to fstab:
/dev/cdrom /mnt/cdrom iso9660 noauto,ro,user 0 0
/dev/sdb1/ /mnt/usb auto noauto,user,rw,sync 0 0
I have the same problem with mounting the cdrom:
mount /dev/cdrom /mnt/cdrom
mount: only root can do that
Is there anything missing?
Last edited by c707176 on Sun Apr 01, 2007 6:04 pm; edited 1 time in total |
|
Back to top |
|
|
suicidal_orange_II Apprentice
Joined: 04 Sep 2004 Posts: 299
|
Posted: Sun Mar 18, 2007 3:45 pm Post subject: |
|
|
In a word - Yes
By giving mount 2 arguements (/dev/cdrom and /mnt/cdrom) it bypasses fstab. Using either on its own mount will look in fstab and match the other one, and read the fact user is in the flags so allow non root to mount
Suicidal_Orange |
|
Back to top |
|
|
c707176 Apprentice
Joined: 01 Mar 2005 Posts: 215
|
Posted: Thu Mar 29, 2007 4:51 pm Post subject: |
|
|
Hello,
thanks for your remark. However, mounting the usb as a user fails:
mount /mnt/usb
mount: special device /dev/sdb/ does not exist
(a path prefix is not a directory)
Any ideas? |
|
Back to top |
|
|
jmbargar n00b
Joined: 24 Mar 2007 Posts: 17 Location: Spain
|
Posted: Fri Mar 30, 2007 10:24 am Post subject: |
|
|
First of all, you have to delete the last slash that you have at the end of /dev/sdb1/ in the fstab file, so you would have to put /dev/sdb1 instead of /dev/sdb1/
After that, you would have to have created the folder that you have defined in /etc/fstab, in your case you would have done from a root terminal the follow:
At last, you have to grant permissions for mounting your usb device in the path specified in the fstab. Try to do the follow from a root terminal:
now try to mount the usb device from your user account. _________________ J. Manuel Barrios |
|
Back to top |
|
|
Ehnvis Guru
Joined: 13 Jun 2006 Posts: 305 Location: /dev/random
|
Posted: Fri Mar 30, 2007 11:37 am Post subject: |
|
|
Do your user belong to the cdrom and usb groups? If not you have to add the user to those groups.
And there is no need to change permissions to the directory like jmbargar says, i've never needed to change that anyway. _________________ HP NC 4010, Pentium-M 725 1.6GHz w/ 1Gb RAM, 60Gb Hitachi Travelstar.
Running Gentoo-2.6.21-r4 (again as 2.6.22 kernels hogs CPU), all but SD reader works fine. |
|
Back to top |
|
|
jmbargar n00b
Joined: 24 Mar 2007 Posts: 17 Location: Spain
|
Posted: Fri Mar 30, 2007 1:42 pm Post subject: |
|
|
The Ehnvis option is valid as well, you have to do all I have said you, but if you don't want to change permissions you can add your user to usb group opening a root terminal and writting something like the follow:
Code: | gpasswd -a user group |
where group must be "usb".
You can check that you have done all right opening a user terminal and writting:
in the output you must see that you have been added to the usb group correctly.
You have to do the same for mounting your cd from your user account. Only change the /mnt/cdrom permissions or add your user to the cdrom group like I have explained you with usb devices. _________________ J. Manuel Barrios |
|
Back to top |
|
|
lonrot_m Apprentice
Joined: 18 Jun 2005 Posts: 274 Location: Mexico
|
Posted: Fri Mar 30, 2007 2:32 pm Post subject: |
|
|
I think the best way to do this is modifying your udev rules to your usb. _________________ The only fool bigger than the person who knows it all is the person who argues with him. |
|
Back to top |
|
|
c707176 Apprentice
Joined: 01 Mar 2005 Posts: 215
|
Posted: Sun Apr 01, 2007 6:03 pm Post subject: [solved] mount usb only works as root |
|
|
Thanks for your hints! It works now! |
|
Back to top |
|
|
|