Chmod Permission Calculator
Convert Linux file permissions between octal, symbolic and plain-English — with an ls -l preview, ready-to-run chmod commands and special-bit warnings, 100% in your browser.
Type an octal value like 755, a symbolic form like rwxr-xr-x or a chmod-style
change like u+x,g-w, or tick the boxes — all three stay in sync, and the preview,
description and warnings update as you go.
Set the permissions
3 or 4 digits (0–7). A 4th leading digit holds the special bits: 4 = SetUID, 2 = SetGID, 1 = sticky.
Full form rwxr-xr-x (sets everything) or chmod-style changes like u+x,g-w,o=r (applied to the current permissions).
Result
How chmod permissions work
How the octal number is built
Each of the three classes — owner, group, others — is one octal digit. Each permission is a
bit: r = 4, w = 2, x = 1. Add the bits that are set:
| Permissions | Bits | Digit | Permissions | Bits | Digit |
|---|---|---|---|---|---|
| rwx | 4+2+1 | 7 | r-x | 4+0+1 | 5 |
| rw- | 4+2+0 | 6 | r-- | 4+0+0 | 4 |
| -wx | 0+2+1 | 3 | -w- | 0+2+0 | 2 |
| -w- | 0+2+0 | 2 | --x | 0+0+1 | 1 |
| r-- | 4+0+0 | 4 | --- | 0+0+0 | 0 |
So 755 means owner rwx (7), group r-x (5), others r-x (5).
A 4th leading digit carries the special bits — 4 = SetUID, 2 = SetGID, 1 = sticky — which is why
/usr/bin/passwd is 4755 and /tmp is 1777.
Symbolic notation
A chmod-style change is a comma-separated list of clauses, each with three parts:
- Who —
uowner,ggroup,oothers,aall (the default when you omit it). - Operator —
=set exactly,+add,-remove (defaults to+). - What —
rread,wwrite,xexecute,sSetUID/SetGID,tsticky.
Examples: chmod u+x script.sh makes a script executable for its owner;
chmod g-w,o-r notes.txt strips group write and everyone-else read;
chmod a=r file leaves exactly read for everybody;
chmod u+s,g+s app sets both special bits.
The 9-character form rwxr-xr-x is the same idea written out in full — it sets
everything at once, which is why it is safer when you want an exact result rather than a tweak.
The special bits
- SetUID (4) — on a file, the program runs with the owner's privileges no matter who runs it (that is how
passwdcan write/etc/shadow). - SetGID (2) — on a file, the program runs with the group's privileges; on a directory, new files inherit the directory's group — the standard setup for shared project directories (e.g.
2770). - Sticky (1) — on a directory, only a file's owner (or the directory's owner) can delete or rename it — that is why
/tmpis1777: everyone can write, but nobody can delete anyone else's files.
ls shows these in the execute slots: s/t when execute is also set,
uppercase S/T when the bit is set but execute is missing.
Common mistakes
777on a script or config file — anyone on the system can modify it, which is code execution or config tampering for the person running it.- A world-writable directory without the sticky bit — anyone can delete or rename other users' files in it.
- Forgetting the sticky bit on a shared scratch directory (you want
1777, not777). - A shared directory without SetGID — new files land in each user's own group, so teammates can't read them (you want
2770).