Chmod Calculator

Convert chmod values between numeric and symbolic formats, inspect owner, group, and others permissions with a live interactive grid, compare two chmod values side-by-side, view an octal bit breakdown, and get risk indicators — plus a ready-to-use chmod command.

Input

Enter a numeric chmod value, a symbolic value, or both if they match.

3 digits (e.g. 755) or 4 digits with special bits (e.g. 4755).
9 characters — setuid/setgid show as s/S, sticky as t/T.
Used in the command preview for direct copy-paste.
Owner
Group
Others
Read (r)
Write (w)
Execute (x)
Reset

Result

Owner, group, others breakdown with ready-to-use command preview.

Numeric 444
Symbolic r--r--r--
Owner r--
Group r--
Others r--
Command preview chmod 444 demo-file.txt

What this means

Owner can read.

Group can read.

Others can read.

For demo-file.txt, the owner can read. Users in the group can read. Everyone else can read.

Common presets

Compare permissions

Type two chmod values to compare them side-by-side, bit by bit.

A
B
Diff type a value in A and B to compare

Recent history

Last 5 chmod values you used.

No history yet.

How chmod works

chmod maps numeric values to owner, group, and others permissions.

Numeric notation

Each digit represents permissions for owner, group, and others.

Permission values

4 = read, 2 = write, 1 = execute.

Practical example

755 becomes rwxr-xr-x.

Special bits

A leading digit adds setuid (4), setgid (2), or sticky (1) — e.g. 4755, 1777.

Related tool

Calculate permissions from a Linux umask value.

Need to calculate the resulting file and directory permissions from a Linux umask value?

Open umask Calculator

Common chmod values

The 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

How to calculate a chmod value

Work it out by hand in four steps.

  1. Give each permission a value: read = 4, write = 2, execute = 1.
  2. Add the values for each class. Owner rwx = 4+2+1 = 7, group r-x = 4+1 = 5, others r-- = 4.
  3. Write the three digits in order owner, group, others: chmod 754.
  4. Optionally put a special-bit digit in front: setuid 4, setgid 2, sticky 1, so 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 = ---.

chmod command examples

Ready-to-adapt commands for everyday Linux administration.

chmod 755 deploy.sh
Owner can edit and run the script; everyone else can read and run it.
chmod +x deploy.sh
Add execute permission without touching read/write bits.
chmod u+x,go-w notes.txt
Symbolic mode: owner gains execute, group and others lose write.
chmod 600 ~/.ssh/id_ed25519
Private key readable only by you; OpenSSH refuses keys that others can read.
find /var/www/site -type d -exec chmod 755 {} +
Set every directory under the web root to 755.
find /var/www/site -type f -exec chmod 644 {} +
Set every file under the web root to 644 (safer than chmod -R 755).
chmod 1777 /srv/shared/tmp
World-writable scratch directory where users cannot delete each other's files.

chmod FAQ

Short answers to the questions people ask most about Linux file permissions.

What does chmod 755 mean?

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.

What does chmod 644 mean?

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.

Is chmod 777 safe?

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.

What is the difference between numeric and symbolic chmod?

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.

What does a fourth leading digit mean, as in 4755, 2775 or 1777?

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).

What permissions should SSH files have?

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.