Can't Mount USB Drive As User Under FreeBSD 10

Polytropon freebsd at edvax.de
Fri Feb 14 07:45:37 UTC 2014


On Fri, 14 Feb 2014 04:39:46 +0000, B J wrote:
> I've had problems configuring the machine to mount external USB
> drives.  I can mount USB thumb drives when logged in as root using:
> 
> mount -t msdosfs -o -m=644,-M=755 /dev/da0s1 /mnt/root
> 
> after creating the directory /mnt/root.

Make sure the user who wants to perform the mount operation
has sufficient rights, which is that he has +rw for the device
file and he is the owner of the mount point directory.



> It appears that external USB hard drives will automatically mount on
> the desktop while I'm operating as root as well.

You should not operate a desktop as root. :-)



> If I try the "mount -t msdosfs" command for a USB thumb drive while
> running as a user, I get an "operation not permitted" error.  External
> hard drives won't mount at all.

Correct. USB thumb drives and USB external hard disks are the
same kind of device to the OS.



> I followed the steps given in section 18.5 of the handbook
> and I even modified:
> 
> /usr/local/etc/PolicyKit/PolicyKit.conf
> 
> in accordance with Step 2, Section 3 of:
> 
> http://www.freebsd.org/gnome/docs/halfaq.html#q3
> 
> Nothing seems to work.  What did I do wrong?  Did I miss something?

Probably. 18.5.2. instructs you to put "vfs.usermount=1" into
the /etc/sysctl.conf configuration file. I assume this is the
important step you've been missing.

Also see the instructions about "operator" group membership
and additional tuning of /etc/devfs.rules in the same chapter.


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list