Enter a numeric chmod value, a symbolic value, or both if they match.
Owner, group, others breakdown with ready-to-use command preview.
Owner can read and write.
Group can read.
Others can no permissions.
For demo-file.txt, the owner can read and write. Users in the group can read. Everyone else can no permissions.
Type two chmod values to compare them side-by-side, bit by bit.
Last 5 chmod values you used.
chmod maps numeric values to owner, group, and others permissions.
Each digit represents permissions for owner, group, and others.
4 = read, 2 = write, 1 = execute.
755 becomes rwxr-xr-x.
A leading digit adds setuid (4), setgid (2), or sticky (1) — e.g. 4755, 1777.
Calculate permissions from a Linux umask value.
Need to calculate the resulting file and directory permissions from a Linux umask value?
Open umask CalculatorThe octal and symbolic permissions you will meet most often, and when to use each. Click a value to load it in the calculator.
| Octal | Symbolic | Meaning | Typical use |
|---|---|---|---|
777 |
rwxrwxrwx |
Everyone can read, write and execute | Avoid. Any user or compromised process can modify the file |
775 |
rwxrwxr-x |
Owner and group full, others read/execute | Shared project directories edited by a team group |
755 |
rwxr-xr-x |
Owner full, group and others read/execute | Directories, scripts and binaries; web root folders |
750 |
rwxr-x--- |
Owner full, group read/execute, others nothing | Application directories readable only by a service group |
700 |
rwx------ |
Owner full, nobody else | Private directories such as ~/.ssh |
664 |
rw-rw-r-- |
Owner and group read/write, others read | Files edited by a team group |
644 |
rw-r--r-- |
Owner read/write, group and others read | Regular files: HTML, source code, most config files |
640 |
rw-r----- |
Owner read/write, group read, others nothing | Config files with secrets read by a service group |
600 |
rw------- |
Owner read/write, nobody else | SSH private keys, authorized_keys, credential files |
444 |
r--r--r-- |
Everyone read only | Files that must not be changed by anyone |
400 |
r-------- |
Owner read only | Key files such as AWS .pem downloads |
4755 |
rwsr-xr-x |
755 plus setuid: runs with the owner's privileges | System binaries such as /usr/bin/passwd |
2775 |
rwxrwsr-x |
775 plus setgid: new files inherit the directory's group | Shared team directories |
1777 |
rwxrwxrwt |
777 plus sticky bit: only owners can delete their files | /tmp and other shared scratch directories |
Work it out by hand in four steps.
rwx = 4+2+1 = 7, group r-x = 4+1 = 5, others r-- = 4.chmod 754.4754 adds setuid.
To read a value backwards, split each digit into 4, 2 and 1: 6 = 4+2 = rw-, 5 = 4+1 = r-x, 0 = ---.
Ready-to-adapt commands for everyday Linux administration.
chmod 755 deploy.shchmod +x deploy.shchmod u+x,go-w notes.txtchmod 600 ~/.ssh/id_ed25519find /var/www/site -type d -exec chmod 755 {} +find /var/www/site -type f -exec chmod 644 {} +chmod 1777 /srv/shared/tmpShort answers to the questions people ask most about Linux file permissions.
The owner can read, write and execute (7 = 4+2+1); the group and everyone else can read and execute (5 = 4+1). It is the standard mode for directories and executable scripts.
The owner can read and write (6 = 4+2); the group and everyone else can only read (4). It is the usual mode for regular files such as HTML, source code and configuration files.
Almost never. Any user on the system can modify or replace the file, and on a web server a compromised process can use it to plant code. Fix the ownership with chown or grant access through a group (775 or 664) instead.
Numeric (octal) mode sets all permission bits at once, for example chmod 640 file. Symbolic mode changes only the bits you name relative to the current mode, for example chmod g+w file, and leaves the rest untouched.
It sets the special bits: 4 is setuid (the program runs with the file owner's privileges), 2 is setgid (runs with the group's privileges, and new files in a directory inherit its group), 1 is the sticky bit (only a file's owner can delete it from the directory, as on /tmp).
The ~/.ssh directory 700, private keys 600 (or 400), authorized_keys 600 and public keys 644. OpenSSH ignores keys and authorized_keys files that are writable or readable by others.