What did the sticky bit originally do when applied to files?
68
votes
1
answer
4772
views
In various places one can see the "sticky bit" accused of nowadays being a complete misnomer, as its functionality _nowadays_ is to affect the write permissions on directories and act as a _restricted deletion_ flag.
In an AskUbuntu answer the answerer wrote that ["a sticky bit usually applies to directories"](https://askubuntu.com/a/789948/43344) . I observed that indeed modern systems seem in practice to never apply it to files, but that a long time ago the _usual_ case was for it to apply to (executable program image) files rather than to directories. (When it comes to the paucity of modern usage on files, there's a related question at https://unix.stackexchange.com/questions/23757/ .)
This prompted the question:
> [What _did_ a sticky bit applied to an executable do? Was it like setuid then?](https://askubuntu.com/questions/789938/why-do-mount-ping-and-su-have-a-sticky-bit-set/789948#comment1187830_789948)
Note the past tense. This is not https://unix.stackexchange.com/questions/79395/ now. It's how it used to work then.
Asked by JdeBP
(71560 rep)
Jun 30, 2016, 06:49 PM
Last activity: May 24, 2022, 05:32 PM
Last activity: May 24, 2022, 05:32 PM