Chmod Calculator — Unix File Permissions
Build Unix file modes in the browser. Tick read, write, and execute for owner, group, and others. Octal (644, 755) and symbolic (rw-r--r--) stay in sync. Optional setuid, setgid, and sticky bits. Copy chmod 755 file or a symbolic command. Nothing leaves your device.
| Class | Read | Write | Execute |
|---|---|---|---|
| Owner | |||
| Group | |||
| Others |
Owner read, write. Group read. Others read.
chmod 644 file
chmod u=rw,g=r,o=r file
What is a Unix file permission?
Unix file modes are a 12-bit mask. Three triplets (owner, group, others) use read=4, write=2, execute=1. An optional leading digit holds setuid (4), setgid (2), and sticky (1). chmod applies the mode; ls -l prints it as rwxr-xr-x. See: POSIX chmod.
Why Use This Tool
- Web files — Use 644 for files and 755 for directories and scripts. See octal bits →
- Private keys — Lock SSH keys and secrets to 600 so only the owner can read them.
- Shared directories — 775 lets a group write; 1777 sticky /tmp lets users delete only their own files.
- setuid binaries — 4755 runs a program as the file owner (for example passwd).
- Deploy scripts — Copy a chmod command into a Dockerfile, Ansible play, or shell script. Schedule a job →
Tips
- Files are usually 644; directories and executables are usually 755.
- Never 777 a web root — world-writable trees are a common breach path.
- SSH private keys should be 600; .ssh directories 700.
- s in ls means setuid/setgid with execute; S means the special bit without execute. t/T is sticky.
How to Use the Chmod Calculator
Tick the bits or pick a preset
Check read/write/execute for owner, group, and others, or load 644, 755, and other common modes.
Optionally set special bits
setuid, setgid, and sticky add a fourth octal digit (4xxx, 2xxx, 1xxx).
Edit octal or symbolic
Type 755 or rwxr-xr-x (or u=rwx,g=rx,o=rx). The other representation updates live.
Copy chmod
Copy chmod 755 file or the symbolic form. Rename the target if you need a real path.
Worked Examples
Regular file
Owner rw, group r, others r
644 rw-r--r-- chmod 644 file
Executable or directory
Owner rwx, group rx, others rx
755 rwxr-xr-x chmod 755 script.sh
Private file
Owner rw only
600 rw------- chmod 600 id_rsa
Sticky /tmp
Everyone rwx plus sticky
1777 rwxrwxrwt chmod 1777 /tmp
Common Errors & How to Fix Them
| Error Message | Cause | Fix |
|---|---|---|
Octal mode must be 3 or 4 digits from 0–7 | A digit outside 0–7 or the wrong length | Use values like 644, 755, or 0755. Each digit is read(4)+write(2)+execute(1). |
Invalid symbolic mode | The string is not ls-style or chmod clauses | Use rwxr-xr-x, -rwxr-xr-x, or u=rwx,g=rx,o=rx. |
Permission bits
| Feature | Value | Meaning |
|---|---|---|
| 4 | r | Read |
| 2 | w | Write |
| 1 | x | Execute (or search on a directory) |
| 7 | rwx | 4+2+1 |
| setuid | 4xxx / s | Run as the file owner |
| setgid | 2xxx / s | Run as the file group |
| sticky | 1xxx / t | Only the owner can delete |
Frequently Asked Questions
What is a chmod calculator?
It turns Unix permission bits into octal and symbolic form. This one keeps checkboxes, 644-style octal, rwxr-xr-x, and a copyable chmod command in sync, including setuid, setgid, and sticky.
What does chmod 755 mean?
Owner can read, write, and execute (7). Group and others can read and execute (5). Directories and scripts commonly use 755. Files you do not need to run usually use 644.
How do I write a symbolic chmod?
u, g, and o are owner, group, and others. u=rwx,g=rx,o=rx is the same as 755. This tool also accepts ls output such as rwxr-xr-x or -rwxr-xr-x.
What are setuid, setgid, and sticky?
They are the high octal digit. setuid (4xxx) runs a file as its owner. setgid (2xxx) runs as the group or inherits the directory group. sticky (1xxx) on a directory (like /tmp) lets users delete only their own files.
Does this chmod calculator upload my paths?
No. Conversion runs in your browser. The target name is only used to build the command string.