Chmod Calculator
Convert between octal, symbolic and checkbox file permissions.
| Who | Read 4 | Write 2 | Execute 1 |
|---|---|---|---|
| Owner | |||
| Group | |||
| Others |
chmod 644 filename What this allows
- Owner can read, write.
- Group can read.
- Others can read.
Common modes
About the Chmod Calculator
Convert Unix file permissions between the octal form you type into chmod, the rwxr-xr-x form that ls -l prints, and plain checkboxes. Each octal digit is a three-bit field — obvious once you know it, opaque until then.
How to use it
- 1 Type an octal value such as 755, or a symbolic string such as rwxr-xr-x.
- 2 Or tick the read, write and execute boxes for owner, group and others.
- 3 Every other representation updates at the same time.
- 4 Copy the chmod command straight into your terminal.
What it does
- Three-way conversion: octal, symbolic and checkboxes
- setuid, setgid and sticky bit support
- Correct uppercase S and T when the special bit is set without execute
- Plain-English explanation of who can do what
- Common presets with the reason each is used
Frequently asked questions
What does 755 mean?
Read, write and execute for the owner; read and execute for the group and everyone else. Each digit is the sum of read (4), write (2) and execute (1), so 7 = 4+2+1 and 5 = 4+1. It is the standard mode for directories and executable files.
What is the difference between 644 and 755?
The execute bit. 644 is for regular files that only need to be read; 755 adds execute, which a directory needs before anyone can enter it and a script needs before it can run. Setting 644 on a directory makes it unusable even though the files inside are readable.
Why should I never use 777?
It lets any user on the system read, modify and execute the file. On a shared or internet-facing machine that is a direct path to compromise, and many web servers refuse to run scripts with world-writable permissions precisely because of it. If 777 appears to fix a problem, the real issue is file ownership — fix that instead.
What do setuid, setgid and the sticky bit do?
setuid makes an executable run as its owner rather than the person invoking it — how passwd can edit a root-owned file. setgid does the same for the group, and on a directory makes new files inherit that group. The sticky bit on a directory means only a file's owner can delete it, which is why anyone can write to /tmp but nobody can delete your files there.
Why does ls show an uppercase S instead of s?
Because the special bit is set but the execute bit is not. A lowercase s means setuid plus execute, which is what you normally want; an uppercase S means setuid on a file nobody can execute, which is almost always a mistake.