I have a file owned by user1:group1. It has permission 770 deliberately so that other users in group1 can collaborate on it. When I open the file as user2 (who is in group1), I can edit it and save changes as expected, but when I save those changes the file ownership is changed to user2:user2.
The closest I found to the problem from my google search was this question prevent group ownership change on file save Which seemed to just say “put up with it”, but that was five years ago. Surely it can't still be the case that collaboration isn't possible within Linux desktop environments, so what am I doing wrong?
If you set the "set group id" (SGID) bit on a directory, the files created in the directory inherit the group id of the directory, instead of the primary group id of the creating user. New subdirectories also get the SGID bit set automatically, so you don't need to do it manually; existing subdirectories must be changed manually, though.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments