STICKY(7)
π STICKY(7) π
okay so bestie, welcome to the sticky(7) page from the Miscellaneous Information Manual. it's literally all about the sticky bit and append-only directories, and it's giving permissions lore. no cap. π
β¨ NAME β¨
sticky β sticky text and append-only directories
πΈ DESCRIPTION πΈ
There's a special file mode called the sticky bit (mode S_ISTXT) that's used to indicate special treatment for directories. For regular files? It's ignored. literally ignored, bestie. π For the whole explanation of file modes, see chmod(2) or the file <sys/stat.h>.
π₯ STICKY DIRECTORIES π₯
When a directory has its sticky bit set, it becomes an append-only directory β or, more accurately, a directory in which the deletion of files is restricted. The way that works: a file in a sticky directory may only be removed or renamed by a user if both things are true:
- the user has write permission for the directory, and
- the user is the owner of the file, the owner of the directory, or the super-user.
This feature is usefully applied to directories such as /tmp, which must be publicly writable but should deny users the license to arbitrarily delete or rename each others' files. π«Ά
Any user may create a sticky directory. For details about modifying file modes, see chmod(1). β¨
π¦ HISTORY π¦
A sticky command appeared in Version 7 AT&T UNIX/32V. history icon behavior, honestly. π
π BUGS π
Neither open(2) nor mkdir(2) will create a file with the sticky bit set. not me finding that out the hard way π
mwah π this little page is from Debian, dated June 5, 1993. bye bestie, go set some modes responsibly π«Ά
π¦ where this page comes from
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 1980, 1991, 1993 The Regents of the University of California. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms