chmod calculator
Tick who can read, write and run a file. You get the number, the letters and the command to paste.
ReadWriteRun
OwnerGroupEveryone else
Letters
Common permissions
| Number | Letters | Use it for |
|---|---|---|
644 | -rw-r--r-- | Normal files: you edit, everyone reads |
755 | -rwxr-xr-x | Scripts, programs and folders |
600 | -rw------- | SSH private keys and secrets |
700 | -rwx------ | Private folders like ~/.ssh |
640 | -rw-r----- | Config files your group needs to read |
775 | -rwxrwxr-x | Shared project folders |
444 | -r--r--r-- | Files nobody should change |
777 | -rwxrwxrwx | Almost never: anyone can change it |
How it works
- Three digitsOne each for the owner, the group and everyone else. Read is 4, write is 2 and run is 1, added together.
- Common picks644 for normal files, 755 for scripts and folders, 600 for SSH keys.
Questions
What does 777 do?
It lets anyone read, change and run the file. It is almost never what you want on a server.
Why does SSH refuse my key?
Private keys must not be readable by others. Run chmod 600 on the key file.
More tools
Built something with it?
Show it in the server, get a code review, or ask the people who use these tools every day.
online now · members