I have a shared directory at /
with access 777. So all my users can create files in it. But I want to prevent users from deleting each others files. Any way to do it. I remember something about a setting special bit but can't really remember what exactly it is.
Asked
Active
Viewed 315 times
0

ctrl-alt-delor
- 27,993

Hussam
- 103
1 Answers
2
You have to set the sticky bit:
chmod 1777 directory
/tmp
is a folder with that behaviour.

Eduardo Trápani
- 12,834
-
It worked. Thanks – Hussam Jun 13 '20 at 18:26
-
Also see https://unix.stackexchange.com/questions/101263/what-are-the-different-ways-to-set-file-permissions-etc-on-gnu-linux – ctrl-alt-delor Jun 13 '20 at 21:44