Chmod Calculator
Symbolic and octal Unix file permissions
Unix permissions are nine bits arranged as three groups of three: read, write and execute, for the owner, the group and everyone else. Because three bits is exactly one octal digit, the whole set collapses into three numbers — read is 4, write is 2, execute is 1, and each digit is their sum. 755 is therefore rwxr-xr-x.
Symbolic notation is the other way to express the same thing, and it is often clearer for changes rather than absolutes: u+x adds execute for the owner without touching anything else, where an octal value always sets all nine bits at once. This calculator translates between the two so you can see exactly what a mode grants before applying it.
How to use it
- Enter an octal mode or tick the boxesType 644 and the checkboxes update, or set the permissions you want and read off the number.
- Read both notationsThe symbolic form rwxr-xr-x is what ls -l prints, so being able to move between the two is what makes a directory listing legible.
- Think about the group and other columnsMost mistakes live there. Granting write to everyone is rarely intended and is exactly what an audit will flag.
Frequently asked questions
What does chmod 755 mean?
The owner can read, write and execute; group and others can read and execute but not write. It is the standard mode for a directory or an executable script that everyone should be able to use and only the owner should be able to change.
What is the difference between 644 and 755?
644 grants read and write to the owner and read-only to everyone else, which is right for an ordinary file. 755 adds the execute bit throughout. Files should generally be 644 and directories 755 — a directory without execute cannot be entered at all, even if it is readable.
Why does a directory need the execute bit?
Because on a directory, execute means "may traverse". Read lets you list the names inside; execute lets you access an entry you already know the name of. A directory with read but no execute gives you a list of files you cannot open, which is almost never what anyone wants.
Is chmod 777 ever the right answer?
Essentially never. It lets any user on the system modify the file, and for a script or a web-served file that is a direct path to compromise. It is the reflex fix for a permissions error and it almost always overshoots — the real problem is usually ownership, which chown fixes properly.
What is the fourth digit for?
Special bits: setuid (4), setgid (2) and the sticky bit (1). Setuid runs an executable as its owner, setgid does the same for the group or makes new files in a directory inherit it, and the sticky bit on a shared directory like /tmp stops users deleting each other’s files. Setuid in particular deserves real caution.