mounting usb flash drive as user

Jon Wolfgang jon-bsd at comcast.net
Sat Mar 10 04:42:56 UTC 2007


I am trying to mount a usb flash drive as a user under FreeBSD 6.2-RELEASE.

I have followed the steps in the handbook, but it is not quite working.

My user account is jon and is a member of the operator group.  I have 
set the vfs.usermount variable to 1.

I am trying to mount the drive at /usbdrv.  Here is a terminal output.

Script started on Fri Mar  9 23:26:53 2007
[jon at charon ~]$ sysctl vfs.usermount
vfs.usermount: 1
[jon at charon ~]$ ls -l /dev | grep da0
crw-r-----  1 root  operator    0, 163 Mar  9 22:38 da0
crw-rw----  1 root  operator    0, 164 Mar  9 22:38 da0s1
[jon at charon ~]$ ls -l / | grep usbdrv
drwxr-xr-x   2 jon   jon     512 Mar  7 18:25 usbdrv/
[jon at charon ~]$ mount -t msdos /dev/da0s1 /usbdrv
mount_msdosfs: /dev/da0s1: Operation not permitted
[jon at charon ~]$ exit

Script done on Fri Mar  9 23:27:37 2007

However, if I su to root, and mount and unmount the drive, then the user 
is able to mount it.  This is kind of annoying though.

Did I miss a step somewhere?  Any suggestions are appreciated.

Thanks,
Jon




More information about the freebsd-questions mailing list