Skip to content
Advertisement

Configuring permissions to folder in ubuntu in order to prevent user’s from removing files of others

I have a folder owned by a group named “wheel”.

The ‘ls’ command details for that folder is:

drwxrws--- 2 tps wheel 4096 may 8 08:10 tsreports

(tps = a user, owner of the file, wheel = the group, tsreports = name of the folder)


I need to configure the folder permissions in such way that files written into it are still owned by the wheel group, but so that one member of wheel cannot delete another member’s files.

I think I already managed the part where newly created files in the folder will be automatically owned by the ‘wheel’ group (I used chmod g+s tpsreports in order to do that) but I’m not sure how I can prevent one member of ‘wheel’ from deleting another’s file.

I could use some help, Thanks.

Advertisement

Answer

On the internet, I found this URL, mentioning a “sticky bit”, which might solve your problem.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement