Raspbian + Flash Drive + fstab

First off, you need to figure out the path of your flash drive:


fdisk -l

Then… edit /etc/fstab as follows:


/dev/sda1 /mnt/flash vfat rw,user,umask=0002,uid=1001,gid=121 0 0

Note that umask is… the “inverted” regular file mask. This represents 665 (because we’re evil). As per uid + gid, you can figure it out by means of this command:


id username

Update:

The best filesystem to use, if you need to maintain compatibility between the Flash Drive you’ll use with your Raspberry, and macOS, is probably ExFat. Now, problem is: Linux doesn’t really support ExFat by default.

So, we’ll need to install it, as follows:


sudo apt-get install exfat-fuse

In such case, your /etc/fstab file should look like this:


/dev/sda1 /mnt/flash exfat. rw,user,umask=0002,uid=1001,gid=121 0 0