My intent is to set up a drive that any user can read to, write from, and execute on. Moreover, the users must be able to use the drive at the same time.
I have my fstab entry set up like this:
/dev/sdc1 /media/data2 auto rw,users,noauto, exec 0 0
The drive is 1TB and formatted as FAT32. Right now, any user can mount the drive. A user that has mounted the drive may read, write, and execute, but if another user logs on and attempts to write or execute using this drive while the first user has mounted it, they are disallowed!
The second user may unmount the drive and then mount and use it as desired, but this would have consequences for the first user.
How do I set it up so that multiple users may use the drive at the same time?
Best Answer
Either you follow the advice in my comment and automount the drive at startup and disallow mounting and unmounting by users by changing
users
tonouser
The other possibility would be to assign all files on the drive certain gids. (group-ids)
source man mount
So as an example, to assign everything on the drive the root uid and gid use something like
uid=0,gid=0,umask=000
this should make everything on the drive be owned by root, but still be usable through the open public umask.If you want more control, you should add the users that are allowed to use the content of the drive to a certain group and look up its id, then you do like above but replace the gid by its value (say 123 here)
uid=0,gid=123,umask=007
. this should make the files (and directories) owned by user root and the group that belongs to 123, makes it readable, executable and writable to them, but they are locked to the public.Never the less you should actually read the manpages about
mount
,groups
andumask
, because I cannot guarantee for the above to work. But I still hope I could push you into the right direction.