How to use the chmod calculator
- Tick the boxes for what the owner, the group and everyone else may do. Or type a number such as
644, or a string such asrw-r--r--. - Enter the file or folder name to complete the command.
- Click Copy and paste the command into your terminal.
How chmod numbers work
Each permission has a value: read is 4, write is 2 and execute is 1. Add the ones you want to get a digit from 0 to 7. A chmod number has one digit each for the owner, the group and everyone else.
| Digit | Permissions | Symbolic |
|---|---|---|
| 7 | Read, write and execute | rwx |
| 6 | Read and write | rw- |
| 5 | Read and execute | r-x |
| 4 | Read only | r-- |
| 0 | Nothing | --- |
Common permission sets
| Number | Symbolic | Typical use |
|---|---|---|
| 644 | rw-r--r-- | Normal files: web pages, images, config files |
| 755 | rwxr-xr-x | Folders, scripts and programs |
| 600 | rw------- | Private files such as SSH keys and .env files |
| 700 | rwx------ | Private folders such as ~/.ssh |
| 664 | rw-rw-r-- | Files a team edits together |
| 775 | rwxrwxr-x | Shared team folders |
| 400 | r-------- | Read-only secrets, such as a cloud key file |
Files and folders are different
On a folder, read lets you list its contents, write lets you add and delete files in it, and execute lets you enter it. A folder without execute cannot be opened, which is why folders are usually 755 while the files inside are 644.
Why 777 is a bad idea
777 lets every user on the system change or replace the file. On a web server, that means any compromised script can rewrite your site. If something only works with 777, the real problem is almost always the wrong owner, and chown is the fix.
Special bits
- Setuid (4000): a program runs as the file's owner, not as the person who started it.
- Setgid (2000): on a folder, new files inherit the folder's group. Handy for shared team folders.
- Sticky bit (1000): on a folder, people can delete only their own files.
/tmpuses it.
Private by design
This tool runs entirely in your web browser. Nothing you type or paste is sent to a server, logged or stored, so it is safe to use with internal addresses, configuration files and other work data. There is no sign-up and it keeps working offline once the page has loaded.
Frequently asked questions
What does chmod 755 mean?
The owner can read, write and execute. The group and everyone else can read and execute but not change the file. It is the usual setting for folders and scripts.
What does chmod 644 mean?
The owner can read and write. Everyone else can only read. It is the usual setting for ordinary files.
What permissions should an SSH private key have?
600, so only you can read it. SSH refuses to use a key that other users can read.
How do I change permissions on a folder and everything in it?
Add -R, for example chmod -R 755 folder. Take care, because that also makes every file inside executable.
What is the difference between chmod and chown?
chmod changes what the owner, group and others are allowed to do. chown changes who the owner and group are.