I have a FreeBSD 10.3 installation in which I have configured to automount removable storage (i.e. USB flash or hard disks). Automount does work except the permissions are incorrect. Users can read and execute, but cannot write. To write to the USB storage device, you need to be either
root or use
First off, there are several similar questions here (i.e. USB drive permissions when automounting), but they are Linux based which means they use
udev while FreeBSD uses
Per the instructions in the FreeBSD Handbook Chapter 17.4.2, I am able to mount my USB devices in the
/media directory. Issuing
ls -la /media as a regular user I get:
$ ls -la total 14 drwxr-xr-x 3 root wheel 512 Apr 14 18:56 . drwxr-xr-x 19 root wheel 26 Apr 14 14:56 .. drwxr-xr-x 3 root wheel 512 Apr 14 10:52 DataDisk drwxr-xr-x 3 root wheel 512 Apr 14 19:02 FAT32
As you can see, I have two disks automatically mounted - "DataDisk" and "FAT32". I can browse either drive and even run scripts from either drive which is correct; the permissions are indicated above.
But, I cannot write.
The user in question is a member of the
wheel group. If I manually set the permissions (
chmod 660 /media/DataDisk), everything works until I unmount/remount or reboot.
I am guessing that I need to set the permissions (as options) in
/etc/auto_master but the FreeBSD man page is so vague, I am not sure what to do.
Can someone point me in a direction to solve this?