0

How can I allow multiple users to write new files and read other users' files in a specific directory (workdir) without the ability to delete or modify other users' files? One user, referred to as the supervisor (sup), should have full permissions to all files in the workdir without root privileges.

I attempted to set this up by assigning sup as the UID and GID of the workdir, adding the sticky bit, and making the GID inheritable (chmod g+s workdir). The permissions of workdir are currently set as: drwxrwxrwt sup sup.

However, when a user creates a subdirectory, the sticky bit is not inherited, only the GID. I researched ACL but discovered that it cannot set the sticky bit.

I found some solutions online that involve using a second process to monitor for new directories and add the sticky bit. However, this approach requires root privileges as sup is not the owner of the subdirectories (I think, I tried it out and sup could set the permissions of the workdir but not any subdir created by a user).

  • Does this answers your question: https://unix.stackexchange.com/a/209029/553564 – memchr Jul 07 '23 at 09:21
  • It does in the case where I have root privilege, but the "supervisor" needs to be able to set things up themselves. – Cashcoe Jul 07 '23 at 09:31

0 Answers0