sticky-bit · shipping · also directory sticky bit, restricted deletion flag

Sticky bit

The sticky bit on a Linux directory limits entry removal and renaming to the file owner, directory owner or a suitably privileged process.

Related Observatory article: Read on hesela.com

Directory rule: S_ISVTX is octal 01000. It adds an ownership check when removing or renaming entries; it does not replace directory write and pathname search checks. CAP_FOWNER can bypass the sticky check, but passing that check alone does not authorize the operation. [1] [2] [4]

Rename: The source entry is checked against its parent directory. Replacing an existing destination also requires satisfying that destination's sticky restriction. Owning the source file does not by itself authorize replacing another owner's destination. [3]

Payload: The bit is not a general read-only flag for contained files. File-content access is separate from permission to remove a name. Linux protected_regular and protected_fifos settings add conditional restrictions on O_CREAT opens of existing objects in writable sticky directories; these are separate policies, not the sticky rule alone. [1] [5]

Recovery: Matching file bytes and ordinary rwx permissions does not establish an equivalent directory-entry policy. Directory mode, directory ownership and target ownership also matter; read-only filesystems and immutable flags can independently prevent removal. [2]

Relations

related
Directory, Unlink, POSIX access control list

Limitations

  • The described ownership rule is Linux-scoped; it is not a complete cross-platform authorization model.

Citations

  1. Linux man-pages: inode(7), S_ISVTX and directory mode (accessed 2026-11-15)
  2. Linux man-pages: rename(2), source and destination restrictions (accessed 2026-11-15)
  3. Linux man-pages: capabilities(7), CAP_FOWNER versus access overrides (accessed 2026-11-15)
  4. Linux kernel documentation: protected_regular and protected_fifos (accessed 2026-11-15)
Sources & caveats
  • Primary-source synthesis of Linux directory semantics, not a new permission experiment or a claim about historical sticky-bit uses on executable files.
  • Recovery guidance is an engineering inference from the documented checks, not a measured backup outcome.
  • Human context: https://hesela.com/analyses/posix-acl-restore-permissions/#sticky-directory

JSON: /data/terms/sticky-bit.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. Sticky bit. Hesela. 2026-11-15. https://hesela.dev/terms/sticky-bit/