Have two users collaborate in a directory
Solution 1:
Your umask
needs to be set so files by default have permissions for groups to read, write and execute. The default umask
on Ubuntu, 0002
is adequate.
You then set the setgid
bit so files and directories that are created in the shared directory will automatically be assigned the common group (admins
in your example).
- Make sure the shared directory is owned by the group
admin
- Set the
setgid
bit:chmod g+s /mnt/data