DEVELOPER & DATA

chmod Calculator

Unix file permissions in every spelling — octal 755, ls column -rwxr-xr-x, symbolic u=rwx,g=rx — per-class table, setuid/setgid/sticky, chmod commands, umask.

Octal (with the special-bit digit), symbolic, the ls column, binary and decimal, read/write/execute per class, the chmod commands that set the mode, and the umask that yields it by default.

Example: 755 = rwxr-xr-x = u=rwx,g=rx,o=rx, umask 022; -rwxr-sr-x is 2755 with setgid; 1666 shows rw-rw-rwT (sticky without execute) and is world-writable; a=rw,o-w gives 664.

v0.1.0 · last reviewed 22 September 2026
Loading the workspace…
BUILT TO BE UNDERSTOOD

Three classes,
three bits each.

How the spellings are read and written, what the special bits do, and where umask fits.

Reading a mode

Octal: three digits for owner, group and others (4 read, 2 write, 1 execute), with an optional leading digit for the special bits (4 setuid, 2 setgid, 1 sticky). The ls column: nine characters rwxrwxrwx, with a leading file-type character allowed and s/S, t/T standing in for the execute position when a special bit is set. Symbolic: clauses like u=rwx, g+w, o-x, a=r applied in order to an empty mode, so the result is what chmod would set from scratch.

Special bits

setuid on an executable runs it as the file's owner; setgid runs it as the group, and on a directory makes new files inherit the directory's group; sticky on a directory lets only a file's owner delete it (/tmp). In the ls column a lower-case s or t means the execute bit is also set; a capital S or T means it is not — usually a mistake.

umask and limits

The umask shown is the mask that would produce this mode for a new directory (777 minus the mode) and the file mode it would give (666 minus the mask). Access-control lists, immutable flags and platform-specific bits are outside the classic nine-bit model. Nothing here reads or changes any file. Nothing leaves the browser; the same four anonymous usage counts as the rest of the site apply.

SOURCES

  • POSIX chmod: read 4, write 2, execute 1 per class; setuid 4000, setgid 2000, sticky 1000; s/S and t/T display per ls(1); umask = 777 minus the directory mode

Last reviewed 22 September 2026. How results are checked: How we verify.