Chmod Calculator
Convert a Unix octal file mode like 755 into its rwx symbolic permissions and a plain-English breakdown for owner, group and others.
How it works
Each octal digit = read(4) + write(2) + execute(1) for owner, group, others · optional leading digit = setuid(4) + setgid(2) + sticky(1)
A Unix file mode packs nine permission bits — read, write and execute for each of owner, group and others — into three octal digits, because each group of three bits is exactly one octal digit (0–7). Read is worth 4, write 2 and execute 1, so you add them: 7 is rwx, 6 is rw-, 5 is r-x, 4 is r--. A fourth, leading digit sets the special bits: setuid (4) makes an executable run as its owner, setgid (2) as its group, and the sticky bit (1) on a directory stops users deleting each other’s files. Those special bits reuse the execute slot in the symbolic string — shown as s/t when execute is also set, or capital S/T when it is not.
Worked example
755 breaks into 7, 5, 5. Owner = 7 = 4+2+1 = rwx (read, write, execute); group = 5 = 4+1 = r-x (read, execute); others = 5 = r-x — giving the symbolic string rwxr-xr-x, the classic mode for an executable or a public directory. 644 gives rw-r--r-- (owner reads and writes, everyone else reads); 777 gives rwxrwxrwx (everyone can do everything).
Sources: chmod — POSIX / Wikipedia
Frequently asked questions
What does 755 vs 644 mean?
755 (rwxr-xr-x) lets the owner read, write and run, while group and others may read and run — right for programs, scripts and directories. 644 (rw-r--r--) lets the owner read and write while everyone else only reads — the safe default for regular files that should not be executable.
How do I convert rwx symbolic permissions back to octal?
Read each group of three and add the values of the letters present: r = 4, w = 2, x = 1, a dash = 0. So rwxr-xr-x is (4+2+1)(4+0+1)(4+0+1) = 755, and rw-r--r-- is (4+2+0)(4+0+0)(4+0+0) = 644.
What is the fourth digit for?
It sets special bits above the normal nine. 4 is setuid (an executable runs with the owner’s privileges), 2 is setgid (runs with, or inherits, the group), and 1 is the sticky bit (on a shared directory like /tmp, only a file’s owner can delete it). So 4755 is setuid + rwxr-xr-x, shown as rwsr-xr-x.
Related calculators
This calculator is for educational purposes. Double-check important results before acting on them.