Chmod Calculator (Octal & Symbolic)
Tick the permissions you want, or type an octal value, and copy the chmod command.
| Read (4) | Write (2) | Execute (1) | |
|---|---|---|---|
| Owner | |||
| Group | |||
| Others |
How it works
Each digit in an octal mode is the sum of read (4), write (2) and execute (1) for one class: owner, group, others. So 7 = rwx, 6 = rw-, 5 = r-x, 4 = r--.
Common modes: 644 for regular files (owner can write, everyone can read), 755 for directories and scripts, 600 for private keys, 700 for private directories.
Frequently asked questions
What does chmod 777 do?
It gives everyone read, write and execute permission. It is almost never the right answer, because any user on the system can modify the file.
What permissions should SSH keys have?
Private keys should be 600 and the ~/.ssh directory 700, otherwise SSH refuses to use them.
What is the difference between chmod 644 and 755?
755 adds execute permission for all classes, which is needed for directories (to enter them) and scripts (to run them).
Permission reference
See the chmod permissions cheat sheet for what 755, 644, 600 and 777 mean.