Chmod Calculator
Calculate Linux file permissions. Convert between numeric (octal) and symbolic permission notation.
| Who | Read (4) | Write (2) | Execute (1) | Octal | Symbolic |
|---|
Common Permissions
About this calculator
Tick the read, write and execute boxes for owner, group and others and get the numeric (octal) value and symbolic string, or type a number such as 755 and see the boxes. Presets cover the common cases.
chmod sets who can read, write or run a file on Linux and macOS.
How to use it
- Tick the permission boxes, or type the octal number.
- Read the numeric value and the symbolic form.
- Copy the command, for example
chmod 755 file.
How permissions add up
Each permission has a value: read 4, write 2, execute 1. Add the values for each of the three groups (owner, group, others). So rwx = 7, rw- = 6, r-x = 5 and r-- = 4. 755 means owner rwx, group r-x, others r-x.
Worked example
Common values
| 755 | rwxr-xr-x: programs and directories |
| 644 | rw-r--r--: ordinary files |
| 600 | rw-------: private keys |
| 777 | rwxrwxrwx: everyone can do everything (avoid) |
| 400 | r--------: read-only for owner |
Tips and common mistakes
- Prefer 644 for files and 755 for directories on web servers.
- Avoid 777. It lets any user modify the file.
- SSH private keys must be 600 or the client refuses them.
- Directories need execute permission to be entered.
- Use chmod -R carefully; it changes everything below.
Frequently asked questions
What does chmod 755 mean?
Owner can read, write and execute; group and others can read and execute.
What does chmod 644 mean?
Owner can read and write; everyone else can only read.
What is chmod 777?
Full permission for everyone. It is a security risk.
What do r, w and x stand for?
Read, write and execute.
Why do directories need x?
To enter or list them.
How do I make a script executable?
chmod +x script.sh.