Chmod Calculator — Linux File Permission Calculator
Tick the read, write and execute bits for owner, group and other to get the octal code (755), the symbolic string (-rwxr-xr-x) and the exact chmod command. Paste an octal code or an ls -l string and it decodes the other way. Runs in your browser, no signup.
How it works
A Linux file carries nine permission bits — read, write and execute for three classes of user: the owner, the file's group, and everyone else (others). The chmod command sets those bits, and this calculator converts between the two notations people use to express them: octal and symbolic.
- Each permission has a value. Read = 4, write = 2, execute = 1. These are the mode-bit constants in the Linux
chmod(2)man page. - Add the values per class. For each of owner, group and other, sum the bits you want. Owner
rwx= 4+2+1 = 7; a group withr-x= 4+0+1 = 5. Every digit lands between 0 and 7. - Concatenate owner-group-other. Write the three digits in order to get the octal code, e.g.
7,5,5 → 755. - Special bits become a leading 4th digit. setuid = 4, setgid = 2, sticky = 1, summed into an optional first digit:
4755,1777. These map to the kernel constants S_ISUID (04000), S_ISGID (02000) and S_ISVTX (01000). - Symbolic rendering. Each bit becomes
r/w/xor a dash. A special bit overlays the execute slot per the GNU Coreutils manual: setuid/setgid showswhen execute is on orSwhen it is off; the sticky bit showstorTin the others slot. - Decoding is the reverse. An octal string is split right-to-left into other, group and owner digits (plus an optional special digit), and each digit is decomposed by testing the 4/2/1 bits. A 9-character symbolic string is read slot by slot, treating
s/tas “special + execute on” andS/Tas “special, execute off”.
The whole computation is exact integer arithmetic — no rounding and no external data, so the result never goes stale. The calculator also runs an internal consistency check: it re-derives the octal value from the symbolic string it just rendered and confirms the two agree, the same cross-check used in the worked examples below.
Worked examples
Frequently asked questions
Sources & references
- The Open Group — POSIX.1-2017 chmod utility (symbolic mode grammar)
- Linux man-pages — chmod(2) mode-bit constants (S_ISUID, S_ISGID, S_ISVTX)
- Linux man-pages — chmod(1) numeric and symbolic command forms
- GNU Coreutils manual — File permissions (s/S, t/T display and special digit)
The bit values, symbolic-rendering rules and worked examples on this page were last cross-checked against these sources on 2026-06-11. The chmod specification has been stable for decades, so this tool needs no rate or data updates.
Related tools
Comments & feedback
Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.
Found a bug, edge case, or want to suggest an improvement?
Email me at [email protected] — most fixes ship within 24 hours.