Understand and set Linux file permissions
Every file and directory on Linux, macOS and other Unix-like systems has permissions that control who can read it, change it and run it. They're written either as a number like 755 or as letters like rwxr-xr-x, and set with the chmod command. This calculator converts between the two forms, explains what each setting allows and gives you the exact command to run.
Features
- Checkbox grid for read, write and execute for owner, group and others.
- Type a mode in octal (
644,4755) or symbolic form (rw-r--r--). - Special bits: setuid, setgid and sticky.
- Plain-language summary of the permissions.
- Ready-to-copy chmod command for your file name.
- Common presets with what they're used for.
How the numbers work
Each digit is the sum of read (4), write (2) and execute (1):
| Digit | Permissions | Symbolic |
|---|---|---|
| 7 | read + write + execute | rwx |
| 6 | read + write | rw- |
| 5 | read + execute | r-x |
| 4 | read only | r-- |
| 0 | no access | --- |
The three digits apply to the owner, the group and everyone else, in that order. A fourth leading digit sets the special bits.
Typical permissions
| Mode | Use |
|---|---|
644 |
Regular files, web pages, images |
755 |
Scripts, programs and directories |
600 |
Private files such as SSH keys and .env files |
700 |
Private directories such as ~/.ssh |
664 / 775 |
Files and folders shared with a group |
400 |
Read-only secrets, e.g. cloud key files |
Related tools
Schedule scripts with the Cron Expression Generator, verify downloaded files with the Hash Generator, or convert octal numbers to binary and hexadecimal with the Number Base Converter.