Chmod Calculator - Octal, Symbolic & rwx Permission Bits

This Chmod Calculator converts Unix file permissions between checkbox rwx bits, 3-digit octal (like 755), and symbolic notation (rwxr-xr-x). Toggle owner, group, and other permissions interactively, see live security warnings, paste an octal value for reverse lookup, and copy octal or symbolic chmod commands.

Permission bits

RoleRead (r)Write (w)Execute (x)
Owner (u)
Group (g)
Others (o)

Octal

755

Symbolic

rwxr-xr-x

Execute (x) lets the owner run this file as a program or script.

Commands

chmod 755 filename
chmod u=rwx,g=r-x,o=r-x filename

What each permission means

Unix file permissions use three bits per role: read (4), write (2), and execute (1). On a file, read opens contents, write changes them, and execute runs the file as a program. On a directory, read lists entries, write creates or deletes files inside, and execute lets you cd into the folder.

Permission Bit On files On directories
Read (r) 4 View file contents List directory entries ( ls)
Write (w) 2 Modify or delete the file Create, rename, or remove files inside
Execute (x) 1 Run as a program or script Traverse into the directory ( cd)

Octal digit cheat sheet

Each octal digit (0–7) encodes one triplet - owner, group, then others in the calculator table. Add bit values: read=4, write=2, execute=1.

Digit Symbolic Bit sum
0---0
1--x1
2-w-2
3-wx2+1
4r--4
5r-x4+1
6rw-4+2
7rwx4+2+1

Common permission presets

Mode Symbolic Risk Example paths
600rw-------safe~/.ssh/id_rsa, .env, secrets/api.key
644rw-r--r--safeindex.html, styles/main.css, assets/app.js
700rwx------safe~/.ssh/, ~/scripts/private/
755rwxr-xr-xsafedeploy.sh, ./bin/, /usr/local/bin/tool
777rwxrwxrwxdanger(avoid in production)

Unix permission model

Every file and directory on Unix-like systems carries three permission triplets - owner, group, and others - each with read, write, and execute flags. Octal notation compresses each triplet into one digit (0-7). Symbolic notation spells out r, w, and x with dashes for denied bits.

Common preset pages: chmod 644 , 755 , 777 , 600 , and 700 .

How to run chmod safely

  1. Check current mode:ls -l path/to/file - the left column shows symbolic permissions (e.g. -rwxr-xr-x).
  2. Choose least privilege: 644 for static files, 755 for scripts and directories, 600 for private keys and secrets.
  3. Apply the mode:chmod 755 ./script.sh or symbolic chmod u+x ./script.sh.
  4. Verify:ls -l path/to/file again before deploying.
  5. Recursive only when intentional: chmod -R 755 ./bin/ changes every file under that tree - double-check the path; a typo can break an entire home directory.

Symbolic chmod examples

  • chmod u+x file - add execute for owner
  • chmod go-w file - remove write for group and others
  • chmod a=r file - read-only for all roles
  • chmod u=rwx,g=rx,o=rx file - full assignment (same as 755)

Security warnings & best practices

  • Avoid 777 and world-writable modes. When others can write (o+w), any user can replace file contents - a frequent cause of compromised web servers.
  • Keep private keys at 600. SSH and TLS keys in ~/.ssh/ should not be readable by group or others. OpenSSH may refuse keys that are too permissive.
  • Be careful with execute on upload paths. Granting execute in public/ or upload directories can turn uploaded files into runnable scripts.
  • umask vs chmod:umask sets default permissions for new files; chmod changes existing paths. Typical umask 022 yields new files at 644 and directories at 755.
  • chown vs chmod:chown changes owner and group; chmod only changes permission bits. Setuid, setgid, and sticky bits (fourth octal digit) are out of scope for this calculator.

Chmod FAQ

What does chmod 755 mean?

Octal 755 grants the file owner read, write, and execute (7 = 4+2+1), while group and others get read and execute only (5 = 4+1). Symbolically that is rwxr-xr-x. It is the default for executable scripts and directories on Linux and macOS because the owner can modify the file while everyone else can run or traverse it.

How do I convert octal chmod to symbolic notation?

Each octal digit maps to three bits: 4=read, 2=write, 1=execute. Split 755 into 7, 5, 5. Seven becomes rwx, five becomes r-x, yielding rwxr-xr-x. This calculator performs the mapping instantly when you type octal or click permission checkboxes - no manual bit arithmetic required.

What is the difference between chmod 644 and 755?

644 (rw-r--r--) lets the owner read and write while group and others read only - ideal for static web files. 755 (rwxr-xr-x) adds execute for all three roles, required for scripts and directories. Never use 777 in production; it grants write access to everyone and is a common security misconfiguration.

When should I use chmod 600 or 700?

600 (rw-------) restricts a file to the owner only - standard for SSH private keys, .env secrets, and credential files. 700 (rwx------) does the same but adds execute, typical for private script directories or ~/.ssh folders. Both prevent group and world access entirely.

What does execute mean on a directory?

On a directory, execute does not run the folder like a program - it controls traverse access. Users need execute (x) on a directory to cd into it and access files inside (subject to permissions on those files). A directory at 644 without owner execute blocks even the owner from entering unless they use a parent path workaround. Directories commonly use 755 so owner, group, and others can traverse.

Should I use chmod or chmod -R?

Use plain chmod on a single file when you know the exact path. Use chmod -R only when you intentionally want every file and subdirectory under a tree to share the same mode - for example chmod -R 755 on a private scripts folder. Recursive chmod on the wrong path (such as $HOME or /var/www) is difficult to undo and can break applications. Always verify with ls -l before and after.

What is umask and how is it different from chmod?

umask sets the default permission mask for newly created files and directories - it does not change existing paths. A common umask of 022 subtracts group and world write from new files, yielding 644 files and 755 directories. chmod changes permissions on paths that already exist. Use umask in shell profiles for defaults; use chmod when fixing permissions on deployed assets, keys, or scripts.

Chmod calculator vs terminal chmod: which is easier?

The terminal chmod command is fastest when you already know the octal value and are on the server. This calculator is easier when learning permission bits, auditing a numeric mode from ls -l output, or verifying symbolic notation before running destructive commands on production files.

How are chmod octal digits calculated from rwx checkboxes?

Add bit values per triplet: read=4, write=2, execute=1. Owner rwx = 4+2+1 = 7. Group r-x = 4+0+1 = 5. Others r-x = 5. Concatenate the three digits for 755. Reverse the process by dividing each digit into its bit components - exactly what this tool automates in both directions.

Sources & review

Last reviewed:

Related Dev Tools

Calculator hubs

Related guides