Developer tools · Chmod calculator
The sticky bit's two lives: from swap-resident text to /tmp
· Background
chmod unix access-control
The t in /tmp's mode meant something completely different in 1970s Unix. This post follows the sticky bit from a performance hint to a deletion rule and explains what it does today.
drwxrwxrwt on /tmp — the last letter is not r, w or x, and the usual one-word explanation explains nothing
The string drwxrwxrwt shows why ordinary rwx arithmetic is not the whole story. Sticky is the 1000 bit, rendered in the final execute position. With other-execute present, the character is lowercase t; without it, uppercase T appears. Entering 1777 therefore produces rwxrwxrwt, while the four-digit summary preserves the leading special-bit digit.
This display converts a supplied mode; it does not inspect a directory. The page splits one value into owner, group, other, and special bits, then rebuilds every view from those parts. Their agreement verifies arithmetic, not ownership, ACLs, or filesystem policy. The generated chmod command remains plain text until someone runs it elsewhere.
The original meaning — keep a program's text segment in swap after exit so the next run starts faster on slow disks
The regular-file explanation says sticky once requested that program text remain in swap. That is the complete historical claim supported by these sources. They cite no primary Unix manual, date, named system, or measure of adoption. A careful account can contrast that former file meaning with current directory behavior without inventing a broader operating-system history.
The calculator does establish how the bit is represented. Sticky occupies octal 1000 and shares the other-execute position in symbolic notation. Thus 1777 ends in t because execute is set, while 1644 ends in T because it is absent. The bit masks, parser, renderer, and round-trip tests support those facts, not a chronology of kernel behavior.
The source describes a former file hint but supplies no primary history citation
For regular files, the tool describes sticky as a historical swap hint that modern kernels ignore. The wording should not become a universal claim about every kernel or filesystem. This repository offers a calculator explanation, not a platform survey. Its defensible point is narrower: sticky does not alter the displayed read, write, or execute grants for a regular file.
Representation remains exact even where enforcement is not claimed. With other-execute set, the last character is t; without it, that character is T. The parser restores either form to the sticky bit, and tests cover 1777, 1644, and every mode through 7777. None launches programs, mounts filesystems, or queries a kernel for actual behavior.
The regular-file explanation says modern kernels ignore sticky; no universal claim is made
Directory behavior is the modern use the implementation explains directly. On a shared directory, sticky adds a deletion and rename restriction: people may create entries, but removal is limited to an entry's owner or root. The presets capture 1777 as the /tmp pattern, while the explanation warns when a directory is writable by everyone without sticky.
The display exposes that distinction without claiming to inspect /tmp. Modes 777 and 1777 share the ordinary permissions rwxrwxrwx. Adding 1000 changes the final symbolic x to t and appends +t to generated assignments. Owner, group, and other grants otherwise remain unchanged; real ownership, ACLs, and filesystem rules remain outside the calculation.
Directory sticky behavior is the implemented present-day explanation
The directory sentence states a limited rule: with sticky set, only a file's owner or root may delete or rename it. The tool does not resolve identities, inspect directory ownership, or attempt an operation. A displayed 1777 confirms universal rwx bits plus sticky, but it cannot identify who owns an entry involved in a real dispute.
Additional policy must be investigated separately. The calculator reads no ACLs, capabilities, mount options, mandatory controls, or filesystem state. Switching between file and directory changes the explanation, not the mode. If a rename succeeds or fails unexpectedly, the page cannot explain why; it only isolates the traditional bits for a system-specific investigation.
The tool describes owner or root deletion limits without inspecting policy extensions
Compare 1777 and 777 as directory modes. Mode 777 renders drwxrwxrwx and allows every class to list, create, enter, rename, and delete. The tool warns that users may delete entries they do not own. Enabling sticky produces drwxrwxrwt: the rwx grants stay fixed, while the owner-or-root deletion restriction enters the explanation.
Generated assignments show the same one-bit difference. Mode 777 becomes u=rwx,g=rwx,o=rwx, while 1777 adds +t; the octal preview also retains the leading digit. Neither preview opens the path or executes chmod. The comparison proves that only 1000 changed and explains its t form, but ownership and enforcement still require external inspection.
Worked example: compare 1777 and 777 explanations in the calculator
Setgid history is not supported by these materials. The repository can encode setgid as 2000, render s or S in the group-execute position, and explain directory group inheritance. Those implementation details do not document setgid's origins or connect its development to sticky. Arithmetic for one special bit is not historical evidence about another.
Protected-directory policy also lies beyond the source set. The page reads no fs.protected setting, system configuration, ACL, ownership record, or attempted operation. It can confirm that a supplied mode contains sticky and show its base grants, but it cannot certify that sticky is the machine's only restriction. Broader diagnosis needs evidence from that environment.
Setgid history and protected-directory policy remain outside the source set
The practical distinction fits in one character. For directories, t records sticky with other-execute, while T records sticky without that execute bit. The calculator preserves both forms and keeps 1000 visible in its summary. Its source also mentions a former regular-file hint, but provides too little primary evidence to support a universal historical chronology.
Use the page to settle representation before debating policy. Enter a mode, choose file or directory, and compare octal, symbolic, matrix, summary, and assignments. Agreement confirms a consistent twelve-bit conversion. Stop there unless the target system supplies more evidence: the tool identifies no users, reads no path, executes no command, and inspects no policy extensions.