🔑 Chmod Calculator
Tick read/write/execute for owner, group and others — or type an octal like 755 — and get the matching chmod command, symbolic string, and special-bit handling.
-rwxr-xr-x
chmod 755 file
Read = 4, write = 2, execute = 1 — each digit is the sum for owner, group, then others.
How the chmod calculator works
Unix permissions are three bits (read=4, write=2, execute=1) for each of owner, group and others; the familiar chmod numbers are just those sums — 755 is rwx for the owner (4+2+1) and r-x (4+1) for group and others. The calculator converts live in both directions: click the checkbox grid and read off the octal, or type an octal and watch the grid update. It also covers the fourth, often-forgotten digit — setuid (4), setgid (2) and the sticky bit (1) — showing how 4755 differs from 755, and renders the symbolic form (rwxr-xr-x) as it appears in ls -l output.
Practical defaults: 644 for files and 755 for directories covers most web content (the execute bit on a directory means "can enter it", not "can run it"). Being asked to chmod 777 is almost always a misdiagnosis — it makes the file world-writable, and the real problem is usually ownership, fixed with chown instead.
Frequently asked questions
What does chmod 755 mean?
Owner: read+write+execute (7); group: read+execute (5); others: read+execute (5). In symbolic form rwxr-xr-x — the standard permission for directories and executables that others may use but not modify.
What is the difference between 644 and 755?
644 (rw-r--r--) has no execute bits — right for ordinary files. 755 adds execute for everyone — needed for programs and for directories, where execute means permission to enter.
Why is chmod 777 a bad idea?
It lets any user on the system modify the file. On shared hosting or servers, that turns any other compromised account into a path to yours. If something "only works with 777", the actual problem is usually wrong ownership.
What do setuid, setgid and the sticky bit do?
Setuid (4xxx) runs an executable as its owner; setgid (2xxx) as its group — and on directories makes new files inherit the group. The sticky bit (1xxx) on a directory (like /tmp, mode 1777) lets only a file’s owner delete it.
How do I read rwxr-xr-- as a number?
Score each triplet: rwx = 4+2+1 = 7, r-x = 4+1 = 5, r-- = 4. So rwxr-xr-- is 754.
Related network tools
From the blog
-
chmod 755 Explained: Unix File Permissions Without the Guesswork
What chmod 755 actually means, how the numbers work (read=4, write=2, execute=1), the difference between 644 and 755, when to use 600, and why chmod 777 is almost always the wrong fix. With the setuid/setgid/sticky bits explained.
-
Cron Syntax Explained: The Five Fields, the Shortcuts, and the OR-Rule Trap
How cron expressions work: the five fields (minute, hour, day-of-month, month, day-of-week), the special characters (* , - /), what */15 means, and the day-of-month/day-of-week OR-rule that makes jobs run more often than expected.