You're not going to like this but most of what you need is already on your system:
- Code: Select all
man mount
The link you gave is one of the more coherent references to fstab but it's very Linux filesystem centric and somewhat outdated. I prefer the "template" approach that Fred uses in his
HowTo, it just needs updating:
/dev/sdxx /home/fred/Data vfat umask=0000,uid=1000,gid=1000,auto,rw,users 0 0
** The current approach to specifying the device name is to use either UUID or LABEL. You would find both by executing this command:
- Code: Select all
sudo blkid -c /dev/null
** rw and auto are in the defaults so there really is no reason to explicitly state them as long as some option is used - although I prefer to use the option "defaults".
** Never understood why Fred used the "users" option since the last thing you want is for any old user to unmount the partition ( and the "user" options makes no sense either since the only user present when the system executes fstab is root ).
So a modern fstab template would look something like this for FAT32:
- Code: Select all
UUID=C4DB-C1B0 /media/WinE vfat defaults,utf8,uid=1000,umask=000 0 2
Even here there is some redundancy. "umask=000" will make it accessible to every local user including whoever is "uid=1000" so you really don't need both options. I like to keep it in so that I can send something to the trash without getting an error message and so that I can use Nautilus / Nemo to create a samba share. The utf8 option is for character encoding and to tell you the truth I think it happens by default now - sometimes I add these things out of habit.
And by manipulating uid, gid ( group name or id ), and umask you pretty much have complete control over who can access the partition and with what privileges.