What is the Sticky-Bit?
Posted by chengfu on 1 Nov 2006 10:17 pm. Filed under Misc Stuff.
The sticky bit is an attribute for files and directories on linux. That is the short answer and about as much as I have known about it for the last years. But what exactly is it for?
As always, wikipedia gave the answer:
- The sticky bit on executable files tells the system to keep the file in memory for later executions by the same or other users. Because of persistent storage and caching this usage is obsolete today.
- On directories with the sticky bit set only the owner of a file may modify or delete it regardless of the other access rights. This way a 777ed directory can be used by several users at once: each user will be ably to create files and modify or delete files he has created. Files by other users can’t be accessed though the rights are set to rwxrwxrwx. The /tmp directly is normally set as sticky, “ls -l” indicates a sticky directory with the letter “t”.






