Sunday, 5 May 2019

file permissions - Group ownership in linux


I wondered why a non-root user cannot create a custom group and invite collaborators to that group. Say alice coops with bob, then alice wants to create a directory that only alice and bob can read and write to. Without permissions to create workgroup, the only option is to set the file permissions so that all users in the system have rwx permissions. But then regular user eve can clobber everything between alice and bob.


By using private groups, they can stop regular users from touching their files. I realise that this system would require that a group has an owner, and that alice cannot assign more rights to that group than alice currently has.


Are there other solutions for cooperation than relying on the native file permission system.



Answer



You can use ACLs if your filesystem and your kernel supports it. In your case, alice could use something like setfacl -m u:bob:rwx directory, maybe with -Rfor it to be recursive.


No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...