chmod Calculator
Convert rwx notation to octal and back across owner/group/other, with setuid/setgid/sticky explained — directory and file scenarios included.
>_ USAGE GUIDE
Octal chmod values are just three digit groups — owner, group, other — each summing r=4, w=2, x=1. Mental arithmetic like "which number is rw-r--r--?" is exactly what this tool removes: tick permission bits to read the number, or type the number to see the bits, with the meaning of every special bit spelled out as you go.
- Tick the bits: three checkboxes per segment; the octal value and symbolic string update live
- Type instead: enter
755in the octal field orrwxr-xr-xin the symbolic field and the checkboxes sync automatically - Use presets: one click fills the everyday values 755 / 644 / 600 / 777
- Copy the command: the result panel emits a ready-to-paste
chmod 755 <path>line - Read the special bits: ticking setuid, setgid or sticky shows an explanation of both its file and directory semantics
>_ FAQ
Q1 · Where should 755 and 644 be used?
755 (rwxr-xr-x) suits directories (x means enterable) and executables or scripts; 644 (rw-r--r--) suits regular files — the owner reads and writes, everyone else reads. A common web root is 755 for directories with 644 for files, and private key files should be tightened to 600.
Q2 · What do setuid, setgid and sticky do?
setuid (4000): the file executes as its owner (like passwd). setgid (2000): the file executes with the group identity, and on directories new files inherit the directory's group. sticky (1000): inside the directory only the file owner and root may delete — /tmp is the classic case. In the symbolic string they appear in the x position: lowercase s/t means the special bit and x are both on, uppercase S/T means the special bit is on without x — which is almost always a misconfiguration.
Q3 · When is the octal value three digits versus four?
The leading digit carries the special bits (setuid/setgid/sticky as 4/2/1). It is usually omitted, giving 755; once a special bit is set you must write all four digits, as in 4755. Note that chmod 755 leaves existing special bits untouched, while chmod 0755 clears them explicitly — a common cause of mystery s bits.
Q4 · Does the symbolic input accept s, S, t and T?
Yes. Strings like rwsr-xr-t (4755) or rwSr--r-- (setuid without owner x) parse into checkbox state, and malformed input produces a clear format message instead of a guessed result.
Q5 · What happens if I remove x from a directory?
A directory's x means "may enter and access entries". Without it, even with r you can only list file names but not stat or open anything inside; with x but no r, a known full path still works. When locking a directory down, consider all three segments together — the reason this tool lays them out side by side.