Understanding chmod & Unix Permissions

A quick reference for Linux and Unix file permission concepts — from octal values to symbolic notation and special bits.

How to Use This Calculator

The chmod calculator supports three input methods — all update each other in real time.

  1. 1

    Click the permission grid

    Toggle read, write, and execute checkboxes for owner, group, and others. Green = enabled. The octal value and symbolic string update instantly.

  2. 2

    Type an octal value

    Enter a 3-digit number like 755 or 644 directly into the octal input. Each digit must be 0–7. Add a leading digit (e.g. 4755) for special bits.

  3. 3

    Type a symbolic string

    Enter a symbolic string like rwxr-xr-x. The calculator parses it and converts to octal automatically.

  4. 4

    Use a quick preset

    Click any preset button (755, 644, 600, etc.) for common permission sets with a one-line description of when to use each.

  5. 5

    Copy the command

    Edit the filename, toggle -R for recursive, then hit Copy. You get a ready-to-paste chmod command like chmod 755 deploy.sh.

What is chmod?

chmod (change mode) is a Unix command that sets the read, write, and execute permissions on files and directories. Every file on a Unix/Linux system has three permission groups — owner, group, and others — and three permission bits for each — read (r), write (w), and execute (x).

$chmod 755 script.sh

You can also use symbolic mode to make relative changes without specifying all bits:

chmod u+x script.shAdd execute for owner only
chmod g-w file.txtRemove write from group
chmod a=r readme.txtSet read-only for everyone
chmod -R 644 public/Apply recursively to a directory

Octal Notation

Octal (base-8) notation represents permissions as a 3-digit number. Each digit is the sum of its active bits:

4Read (r)

View file contents

2Write (w)

Modify file contents

1Execute (x)

Run file or enter directory

So 755 means owner (7 = 4+2+1 = rwx), group (5 = 4+1 = r-x), others (5 = r-x). A leading 4th digit represents special bits.

Common Permission Values

OctalSymbolicUse case
755rwxr-xr-xExecutables, web roots, directories
644rw-r--r--Regular files, config files
600rw-------Private keys, SSH files
700rwx------Private executables, directories
444r--r--r--Read-only files
750rwxr-x---Group-accessible scripts
777rwxrwxrwxFull access — avoid in production

Real-World Use Cases

Web server files (Nginx / Apache)

chmod 755 /var/www/htmlWeb root — server must enter the directory
chmod 644 index.html style.cssStatic files — server reads, nobody writes
chmod 755 /var/www/html/bin/Script directories

SSH key files

chmod 700 ~/.sshOnly you can read your .ssh directory
chmod 600 ~/.ssh/id_ed25519Private key — SSH will refuse to use it if world-readable
chmod 644 ~/.ssh/id_ed25519.pubPublic key — fine for others to read
chmod 600 ~/.ssh/authorized_keysAuthorized keys file

Shell scripts and executables

chmod 755 deploy.shOwner can run; others can read and run
chmod 700 backup.shOnly owner can run — keeps backup logic private
chmod 750 team-script.shOwner + group can run; others cannot

Application config files

chmod 600 .envSecrets file — only the process owner reads it
chmod 644 config.yamlNon-sensitive config — readable by service user
chmod 640 database.confDB credentials — owner + group only

Special Bits

setuid (4)s in owner execute

Executable runs with the file owner's privileges. Used by system binaries like passwd.

setgid (2)s in group execute

Executable runs with the group's privileges. On directories, new files inherit the parent group.

sticky (1)t in other execute

Only the file owner can delete files in a directory. Classic use: /tmp.

FAQ

What does chmod 755 mean?

chmod 755 gives the owner full read/write/execute (7), and both group and others read + execute (5 = 4+1). It's the standard for web server directories and executable scripts that others need to run but not modify.

What's the difference between chmod 755 and 644?

644 omits the execute bit. Use 644 for regular text files, HTML, CSS, and images that don't need to be run as programs. Use 755 for directories (execute means "enter") and executable scripts.

Why does chmod 777 appear in red?

777 grants write access to everyone on the system. On a shared server or multi-user environment, any user can modify or delete your files. It's occasionally useful during local development but should never be used in production.

How do I apply permissions recursively?

Use the -R flag: chmod -R 755 my-directory/. This applies the permission to the directory and everything inside it. The calculator's Command Generator has a recursive toggle that adds -R for you.

What does chmod 600 mean for SSH keys?

600 means only the owner can read or write the file (6 = 4+2), and nobody else can access it at all. SSH refuses to use private key files with looser permissions — it's a security check to ensure your key hasn't been exposed.

How do I check a file's current permissions?

Run ls -la filename. The first 10 characters of the output show the type and permissions, e.g. -rwxr-xr-x. Use stat -c "%a %n" filename on Linux to get the octal value directly.

How This Tool Compares

There are a few chmod calculators out there. Here's an honest look at how they differ.

FeatureThis toolOthers
Real-time updatesAll inputs sync instantlyUsually octal-only
Symbolic inputType rwxr-xr-x directlyRead-only display in most
Special bits (setuid/setgid/sticky)Full supportOften omitted
Command generatorEditable filename + -R toggleBasic or absent
Mobile usabilityDesigned mobile-firstMixed — many are desktop-only
Load speedClient-side only, no server callsVaries

Ready to calculate permissions?

Use the interactive calculator to build any permission set.

Open Calculator →