🔑 Linux Chmod Permissions Calculator

Calculate Linux/Unix file permissions with interactive read, write, and execute checkboxes. Generates octal (755, 644) and symbolic permissions.

Free No Signup Required Browser-Based

👤 Owner (User)

👥 Group

🌍 Public (Others)

Octal Permission Code
755
Symbolic: -rwxr-xr-x
$ chmod 755 filename.ext

What Linux Chmod Permissions Calculator Does

Unix file permissions are nine bits, arranged as three groups of three: read, write and execute, for the owner, the group, and everyone else. `chmod` sets them, either as a three-digit octal number or as symbolic text like `u+x`.

The octal form works because each permission triple is a binary number from 0 to 7. Read is worth 4, write 2, execute 1, and any combination is their sum — so 7 is all three, 5 is read plus execute, 6 is read plus write. Once you see 755 as 4+2+1, 4+0+1, 4+0+1, the notation stops being arbitrary.

This calculator converts between octal, symbolic and the `ls -l` display, including the setuid, setgid and sticky bits that occupy a fourth leading digit.

How to Use Linux Chmod Permissions Calculator

  1. Click a preset (755, 644, 777, 600) or check individual r/w/x boxes for Owner, Group, and Others
  2. View the resulting 3-digit octal number and symbolic string
  3. Copy the ready-to-run `chmod` terminal command

Formula Used by Linux Chmod Permissions Calculator

Octal permission value

digit = 4×r + 2×w + 1×x

r
Read — 1 if granted, 0 if not
w
Write — 1 if granted, 0 if not
x
Execute (or, for a directory, "may enter")

Worked example

A file that should be readable, writable and executable by its owner, and read plus execute for everyone else.

  1. Owner: r+w+x = 4 + 2 + 1 = 7
  2. Group: r+x = 4 + 0 + 1 = 5
  3. Other: r+x = 4 + 0 + 1 = 5

Result: chmod 755 — displayed by ls -l as rwxr-xr-x. The standard mode for an executable or a directory.

Default mode from umask

effective = base AND NOT umask

base
666 for new files, 777 for new directories — the OS never sets execute on a new file
umask
Bits to strip, commonly 022 or 002

Worked example

A new file created with the common umask of 022.

  1. Base for a file: 666
  2. Strip umask bits: 666 AND NOT 022

Result: 644 — rw-r--r--. The same umask applied to a new directory gives 777 − 022 = 755.

Octal Digit Reference

OctalBinarySymbolicMeaning
0000---No access
1001--xExecute only
2010-w-Write only
3011-wxWrite and execute
4100r--Read only
5101r-xRead and execute
6110rw-Read and write
7111rwxFull access

Modes You Will Actually Use

And the ones to avoid.

Models -lTypical use
644rw-r--r--Normal file: owner edits, everyone reads
600rw-------Private file — SSH private keys, credentials
755rwxr-xr-xDirectories and executables
700rwx------Private directory, e.g. ~/.ssh
775rwxrwxr-xShared group directory
777rwxrwxrwxEveryone can write and execute — almost never correct

The Fourth Digit: Special Bits

Written before the three permission digits, as in 4755 or 1777.

ValueNameEffect
4setuidExecutable runs as its owner rather than the caller. A classic privilege-escalation vector when misapplied
2setgidOn a directory, new files inherit the directory's group — useful for shared project trees
1stickyIn a shared directory, only a file's owner can delete it. This is why /tmp is 1777

Source: POSIX — chmod utility (The Open Group Base Specifications)

How to Read Your Result

Execute means something different on a directory

On a file, x means the file can be run. On a directory, x means you can traverse into it and access things by name. A directory with r but no x lets you list the names and read nothing; x without r lets you open a known path but not enumerate the contents. Directories almost always need x wherever they have r.

Why 777 is a red flag

It grants write and execute to every user on the system. Web tutorials suggest it as a fix for permission errors because it makes the symptom disappear, but on any multi-user or internet-facing machine it lets any account replace the file's contents. The correct fix is almost always to set the right owner and group, then use 755 or 644.

SSH is strict on purpose

OpenSSH refuses to use a private key that is readable by group or others, and will silently ignore an authorized_keys file in a world-writable directory. `~/.ssh` should be 700 and private keys 600. "Permissions 0644 for key are too open" is the client protecting you.

Limitations & Accuracy Notes

  • These nine bits are the traditional Unix model. POSIX ACLs (`getfacl` / `setfacl`) can grant finer-grained access that `ls -l` only hints at with a trailing "+" on the mode string.
  • SELinux and AppArmor apply mandatory access controls on top of file permissions. An operation can be denied by policy even when the mode allows it.
  • Windows and most FAT/exFAT volumes do not implement this model. Modes shown on such a mount are synthesized by the mount options, not stored on disk.
  • Root generally bypasses permission checks entirely, so a restrictive mode is not a protection against a privileged account.

Frequently Asked Questions

How are Linux chmod octal values calculated?
Read = 4, Write = 2, Execute = 1. The sum of selected permissions determines the digit for Owner, Group, and Others (e.g. 4+2+1 = 7).
What is the difference between 755 and 644 permissions?
755 gives the owner full access (rwx) while group/others can read and execute (scripts/folders). 644 allows owner read/write and others read-only (standard files).
What do the three digits mean?
Owner, group, and everyone else, in that order. Each digit is the sum of read (4), write (2) and execute (1) — so 7 is all three, 6 is read and write, 5 is read and execute.
What does 755 mean?
The owner can read, write and execute; everyone else can read and execute but not modify. It is the normal setting for a directory and for an executable script, and it renders in ls as rwxr-xr-x.
What does 644 mean?
The owner can read and write, everyone else can only read. This is the standard permission for an ordinary file that is not meant to be run.
Why does a directory need the execute bit?
On a directory, execute means "may enter and traverse" rather than "may run". Without it you cannot access anything inside, even files you have permission to read — which is why 644 on a directory makes its contents unreachable.
Is 777 ever the right answer?
Almost never. It lets any user on the system modify the file, and it is usually reached for as a way to make a permissions problem go away rather than diagnose it. On a web server it is a genuine security hole.
What is the fourth digit some tools show?
Special bits: setuid (4), setgid (2) and the sticky bit (1). Setuid makes an executable run as its owner, setgid does the same for the group or makes new files in a directory inherit it, and the sticky bit — used on /tmp — means only a file's owner can delete it.

References & Further Reading

By OnlineToolHubs Team • September 2026