# [solved]How to mount usbdisk as non-root user?

## LaoLiulaoliu

Everytime I have to mount /dev/sdb1 /mnt/usb as the root user.Now I just want to mount it as a normal user.

I have already add my username xxx to the line:usb in the file  /etc/group,but the bash told me that: mount: only root can do that

----------

## Sadako

You need to add the "user" or "users" option to the entry for the usb device in /etc/fstab, read the mount man page for details.

----------

## LaoLiulaoliu

 *Hopeless wrote:*   

> You need to add the "user" or "users" option to the entry for the usb device in /etc/fstab, read the mount man page for details.

 

There is no usb in fstab,but I add "user" in /etc/mtab ,but still can not.

butterfly@localhost ~ $ mount

/dev/sda7 on / type ext3 (rw,noatime)

proc on /proc type proc (rw,noexec,nosuid,nodev)

sysfs on /sys type sysfs (rw,nosuid,nodev,noexec)

udev on /dev type tmpfs (rw,nosuid)

devpts on /dev/pts type devpts (rw,nosuid,noexec)

/dev/sda1 on /mnt/debian type ext3 (rw)

/dev/sda5 on /learn type reiserfs (rw)

/dev/sda6 on /home type ext3 (rw)

/dev/sda8 on /mnt/sda8 type ext3 (rw)

/dev/sda10 on /boot type ext3 (rw)

/dev/sda2 on /mnt/sda2 type ext3 (rw)

shm on /dev/shm type tmpfs (rw,noexec,nosuid,nodev)

usbfs on /proc/bus/usb type usbfs (rw,user,noexec,nosuid,devmode=0664,devgid=85)

binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)

butterfly@localhost ~ $ mount /dev/sdb1 /mnt/usbfs/

mount: only root can do that

----------

## fangorn

To clear this up. To make a user able to mount, there needs to be an entry in /etc/fstab like this one

```
/dev/external/disk6    /mnt/extern          reiserfs   noauto,user,exec      0 0 

```

this assumes that there is an udev rule that maps /dev/sdxy to /dev/external/disky, regardless if your usb device gets /dev/sdb, /dev/sdc, ...

Put something like this in your /etc/udev/rules.d/10_local.rules

```

BUS=="scsi", SYSFS{model}=="OneTouch III    ", SYSFS{vendor}=="Maxtor  ", NAME{all_partitions}="external/disk"

```

The according parameters for your device you get by pluging in your device and running 

```

udevinfo -a -p /sys/block/sdx

```

where sdx is the according device. You can get that by running "dmesg | tail" some seconds after you plugin the device.

----------

## LaoLiulaoliu

I have add the follows to /etc/fstab

/dev/sdb1               /mnt/usbfs      vfat            noauto,user,exec 0 0 

And follow your instruction build this file /etc/udev/rules.d/10_local.rules

BUS=="scsi", SYSFS{model}=="OneTouch III    ", SYSFS{vendor}=="Maxtor  ", NAME{all_partitions}="external/disk" 

And run udevinfo -a -p /sys/block/sda and udevinfo -a -p /sys/block/sdb

I see something that I can not understand.

Then run dmesg | tail ,it shows:

[ 1077.429864] sd 2:0:0:0: [sdb] Mode Sense: 0b 00 00 08

[ 1077.429868] sd 2:0:0:0: [sdb] Assuming drive cache: write through

[ 1077.448859] sd 2:0:0:0: [sdb] 1014527 512-byte hardware sectors (519 MB)

[ 1077.455839] sd 2:0:0:0: [sdb] Write Protect is off

[ 1077.455843] sd 2:0:0:0: [sdb] Mode Sense: 0b 00 00 08

[ 1077.455846] sd 2:0:0:0: [sdb] Assuming drive cache: write through

[ 1077.455850]  sdb: sdb1

[ 1077.469918] sd 2:0:0:0: [sdb] Attached SCSI removable disk

[ 1077.469977] sd 2:0:0:0: Attached scsi generic sg1 type 0

[ 1077.471442] usb-storage: device scan complete

I run mount /dev/sdb1 /mnt/usbfs,the problem still--mount: only root can do that

----------

## Sadako

 *LaoLiulaoliu wrote:*   

> I have add the follows to /etc/fstab
> 
> /dev/sdb1               /mnt/usbfs      vfat            noauto,user,exec 0 0 
> 
> And follow your instruction build this file /etc/udev/rules.d/10_local.rules
> ...

 Once you have the entry in fstab (and sorry about assuming you already did before), you no longer need to specify the device, just the mountpoint, IIRC you still have to be root to specify the device, even if the exact same device is associated with the mountpoint in fstab.

In short, just do `mount /mnt/usbfs` as a normal user.

----------

## Angry_Red_Antz

I'm having the same problem, even though I did follow all your instructions

You think that if I reformat the drive it may help?, the only thing is this usbdrive I use

I also mount it in Win at school

----------

