How to use the chmod calculator
- Tick the Read, Write and Execute boxes for Owner, Group and Other to build your desired permissions.
- Alternatively, type a 3-digit octal code (like
755) or a 9-character symbolic string (likerwxr-xr-x) into the parse field to fill the checkboxes automatically. - Read the Octal and Symbolic rows to see both representations of the same permissions.
- Copy the generated Command row and paste it directly into your terminal.
How Unix file permissions work
Every file and directory on a Unix-like system has three sets of permissions: one for the owner, one for the group and one for others (everyone else). Each set can include read (r), write (w) and execute (x). When a permission is absent it is shown as a hyphen (-).
The octal representation assigns a numeric weight to each permission: read = 4, write = 2, execute = 1. You add the weights together for each role. For example, if the owner should read, write and execute, the owner digit is 4 + 2 + 1 = 7. If the group should only read and execute, the group digit is 4 + 1 = 5. Combining owner 7, group 5 and other 5 gives the familiar 755.
Common permission reference table
The table below lists the most frequently used permission modes. Use this chmod calculator to verify any combination you need.
| Octal | Symbolic | Typical use |
|---|---|---|
| 755 | rwxr-xr-x | Directories and executable scripts |
| 644 | rw-r--r-- | Regular files readable by everyone, writable by owner |
| 700 | rwx------ | Private directories or scripts for the owner only |
| 600 | rw------- | Private configuration files such as SSH keys |
| 777 | rwxrwxrwx | Full access for everyone (rarely appropriate) |
| 400 | r-------- | Read-only file for the owner |
Converting symbolic notation to octal
To convert a symbolic string like rw-r--r-- back to octal, split it into three groups of three characters: rw-, r--, r--. Then apply the weights. Owner gets 4 + 2 + 0 = 6. Group gets 4 + 0 + 0 = 4. Other gets 4 + 0 + 0 = 4. The result is 644.
This chmod calculator performs that conversion automatically when you type a valid 9-character symbolic string into the parse field. It also works in reverse: entering 644 fills the checkboxes so you can see exactly which bits are active.
Applying permissions recursively
The generated command applies to a single path. To change permissions on a directory and everything inside it, add the -R flag: chmod -R 755 /var/www/html. Be careful with recursive changes because applying execute permission to every regular file is usually not what you want.
A common pattern is to set directories to 755 and files to 644 separately using find:
find /path -type d -exec chmod 755 {} +find /path -type f -exec chmod 644 {} +
You can also use tools like subnet calculator for network tasks, but for file-level access control the chmod command is the standard approach.
Common mistakes with file permissions
Setting 777 on web-accessible files is a frequent security error. It allows any user on the system to modify or replace the file. Stick to 644 for files and 755 for directories unless you have a specific reason to grant broader access.
Another mistake is forgetting that directories need the execute bit to be traversable. A directory with 644 (rw-r--r--) cannot be entered even though it appears readable. Always ensure directories have at least x for the roles that need to list their contents.
Finally, remember that changing ownership with chown does not alter the permission bits themselves. Ownership and permissions are independent attributes managed by separate commands.
Worked examples
Each result below was produced by the same code the tool runs, so you can check your own numbers against them.
| Example | Input | Result |
|---|---|---|
| Standard web directory (755) | Parse octal or symbolic input: 755; Owner Read: no; Owner Write: no; Owner Execute: no; Group Read: no; Group Write: no; Group Execute: no; Other Read: no; Other Write: no; Other Execute: no | Octal: 755; Symbolic: rwxr-xr-x; Command: chmod 755 <file> |
| Private script (700) | Parse octal or symbolic input: 700; Owner Read: no; Owner Write: no; Owner Execute: no; Group Read: no; Group Write: no; Group Execute: no; Other Read: no; Other Write: no; Other Execute: no | Octal: 700; Symbolic: rwx------; Command: chmod 700 <file> |
| Public config file (644) | Parse octal or symbolic input: 644; Owner Read: no; Owner Write: no; Owner Execute: no; Group Read: no; Group Write: no; Group Execute: no; Other Read: no; Other Write: no; Other Execute: no | Octal: 644; Symbolic: rw-r--r--; Command: chmod 644 <file> |
| Parse symbolic string | Parse octal or symbolic input: rw-r--r--; Owner Read: no; Owner Write: no; Owner Execute: no; Group Read: no; Group Write: no; Group Execute: no; Other Read: no; Other Write: no; Other Execute: no | Octal: 644; Symbolic: rw-r--r--; Command: chmod 644 <file> |
FAQ
What does 755 mean in chmod?
It means the owner can read, write and execute (7), while the group and others can read and execute (5 each). It is the standard permission for directories and scripts.
How do I convert symbolic permissions to octal?
Assign 4 for read, 2 for write and 1 for execute within each role (owner, group, other), then sum them. For example, rw- is 4+2=6, r-- is 4, so rw-r--r-- becomes 644.
Is 777 ever safe to use?
Almost never on shared or production systems. It grants every user full control over the file or directory, which is a significant security risk.
Why can I not enter a directory even though it shows read permission?
Directories require the execute bit to be opened or traversed. Without it, you cannot cd into the directory or access files inside it, regardless of read permission.
Does this chmod calculator upload my data?
No. All conversions happen locally in your browser. Nothing is sent to any server.
What is the difference between chmod and chown?
chmod changes the permission bits (read, write, execute) on a file or directory. chown changes who owns it. They control different aspects of access.