0

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.

ctrl-alt-delor
  • 27,473
  • 9
  • 58
  • 102
Hussam
  • 103
  • 3

1 Answers1

2

You have to set the sticky bit:

chmod 1777 directory

/tmp is a folder with that behaviour.

Eduardo Trápani
  • 12,032
  • 1
  • 18
  • 35