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
| Role | Read (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 filenamechmod u=rwx,g=r-x,o=r-x filenameCommon presets
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 | --x | 1 |
| 2 | -w- | 2 |
| 3 | -wx | 2+1 |
| 4 | r-- | 4 |
| 5 | r-x | 4+1 |
| 6 | rw- | 4+2 |
| 7 | rwx | 4+2+1 |
Common permission presets
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
- Check current mode:
ls -l path/to/file- the left column shows symbolic permissions (e.g.-rwxr-xr-x). - Choose least privilege: 644 for static files, 755 for scripts and directories, 600 for private keys and secrets.
- Apply the mode:
chmod 755 ./script.shor symbolicchmod u+x ./script.sh. - Verify:
ls -l path/to/fileagain before deploying. -
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 ownerchmod go-w file- remove write for group and otherschmod a=r file- read-only for all roleschmod 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:
umasksets default permissions for new files;chmodchanges existing paths. Typical umask022yields new files at 644 and directories at 755. - chown vs chmod:
chownchanges owner and group;chmodonly 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
- Aspect Ratio Calculator Resize width and height while locking common video and image ratios.
- Unix Timestamp Converter Convert Unix epoch seconds or milliseconds to human-readable dates.
- Binary Hex Decimal Converter Convert between binary, octal, decimal, and hexadecimal with bit grouping.
- Download Time Calculator Estimate download or upload time from file size and connection speed.