chmod calculator
Tick the permissions and read the octal value, the symbolic form (rwxr-xr-x) and a ready-to-copy chmod command. Or type a number or an expression such as u+x,go-w and see what changes.
Your data stays on your computer. Files are processed in your browser and are never uploaded.
Permissions
| Read (r) | Write (w) | Execute (x) | Digit | |
|---|---|---|---|---|
| Owner | 6 | |||
| Group | 4 | |||
| Others | 4 |
Result
chmod 644 filechmod u=rw,g=r,o=r file- Owner: read, write
- Group: read
- Others: read
Apply an expression
Starts from the permissions above and applies a chmod expression, as the command would: who (u, g, o, a), operator (+ - =) and permissions (r, w, x, X, s, t), or another class (g=u). Separate several parts with a comma.
Common permissions
- rw-r--r--Regular files: the owner reads and writes, everyone else only reads. Web pages, documents, configuration.
- rw-rw-r--Like 644, but the group can write too. For files shared within a working group.
- rw-------Only the owner reads and writes. SSH private keys, files with secrets.
- rw-r-----The owner reads and writes, the group reads, others get nothing. Configuration files with private data.
- r--------Read-only and only for the owner. Required by ssh for private keys.
- r--r--r--Read-only for everyone.
- rwxr-xr-xPrograms and directories: the owner can do everything, others can read and enter but not modify.
- rwxrwxr-xLike 755, but the group can modify too. Directories of a working group.
- rwx------Only the owner has access. Private directories such as ~/.ssh.
- rwxr-x---The owner can do everything, the group reads and executes, others get nothing.
- rwxrwxrwxEveryone can do everything. Not recommended: avoid it, especially on servers.
- rwxrwxrwtShared directory with the sticky bit, like /tmp: everyone writes but each user deletes only their own files.
- rwxrwsr-xGroup directory with setgid: new files inherit the directory's group.
- rwsr-xr-xProgram with setuid: it runs with the owner's rights (like passwd). Use with great care.
How to read it
Each octal digit adds read (4), write (2) and execute (1) for one class: 7 = rwx, 5 = r-x, 4 = r--. The three digits are owner, group and others; the fourth, in front, holds setuid (4), setgid (2) and sticky (1).
Directories
On a directory, read lets you list its contents, write lets you create and delete files, execute lets you enter it. Without x you cannot enter, even if you can read.
Where the data goes
The calculation happens only on this page: nothing is saved or sent, and no file is needed.