# [solved] mount usb only works as root

## c707176

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

----------

## suicidal_orange_II

In a word - Yes  :Smile: 

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

----------

## c707176

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?

----------

## jmbargar

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:

```
mkdir /mnt/usb
```

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:

```
chmod 777 /mnt/usb
```

now try to mount the usb device from your user account.

----------

## Ehnvis

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.

----------

## jmbargar

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:

```
gpasswd -a user group
```

where group must be "usb".

You can check that you have done all right opening a user terminal and writting:

```
groups
```

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.

----------

## lonrot_m

I think the best way to do this is modifying your udev rules to your usb.

----------

## c707176

Thanks for your hints! It works now!

----------

