Quick summary: How can I arrange for USB FAT32 thumb drives to be auto-mounted as
/media/USER/LABEL, with non-root read/write permissions?
(There are a lot of questions here about automounting USB drives, but I don't see one that's directly relevant.)
I'm running 14.04.4 LTS on an x86_64 system. I'm using the Cinnamon desktop if that matters. I have a FAT32-formatted USB thumb drive. I've run
fsck on the drive, and it shows no errors.
Until recently, when I inserted the drive into a USB port it would not auto-mount. It would show up in the output of
Bus 001 Device 008: ID 058f:6387 Alcor Micro Corp. Flash Drive
I was able to mount it manually, using something like:
sudo mkdir /tmp/usb ; sudo mount /dev/sdg1 /tmp/usb
but that was less than ideal.
I recently installed the
usbmount package. After that (and a reboot), when I insert the drive it automatically mounts as
$ df /media/usb0 Filesystem 1K-blocks Used Available Use% Mounted on /dev/sdg1 15712248 9080 15703168 1% /media/usb0 $
The problem: I can read everything on the drive, but it all appears to be owned by
root and I can't write to the drive without using
sudo or equivalent.
What I want to happen is this: When I insert the drive, it's automatically mounted as
username is my user name and
label is the volume label on the drive -- and all files on the drive are owned and writable by my account.
This used to happen automatically, but I don't know how I set it up. Some time ago, I upgraded my workstation from Debian 6 to Ubuntu 14.04. I had the auto-mounting worked the way I want it when I was running Debian 6. I was also using a different desktop environment (some version of Gnome, perhaps?). (The transition from Debian 6 to Ubuntu 14.04 happened to coincide with me not using USB drives as much; now I need to start using them again, so I haven't tried this in a while.)