How do I set files to be owned by multiple users?
4 Replies
Ensure the default umask is correct.
The default group of users should be the shared group. chmod g+s on directories may help.
-rw-rw-r-- 1 someuser somegroup 81743 Oct 8 00:45 index.html
The file was probably created by "someuser", who is the owner and is able to read and write the file. Any members of "somegroup" can also read and write the file. All other accounts on the system (including the one that your web server runs under) are able to read the file.
If you want "anotheruser" to also be able to modify the file, you can add that account to the "somegroup" group with the usermod -a -G somegroup anotheruser command.
If you use the setgid bit