Chmod Calculator
Tick read, write and execute for the owner,
group and everyone else to get the octal chmod number and the
symbolic string (rwxr-xr-x) — or type either and the boxes update.
Supports setuid, setgid and the sticky bit. Everything runs in your browser.
| Who | Read (4) | Write (2) | Execute (1) |
|---|---|---|---|
| Owner (user) | |||
| Group (group) | |||
| Other (world) |
Show special permission bits (setuid / setgid / sticky)
chmod 755 filename How chmod permissions work
Every file and directory on a Unix or Linux system carries permissions for three classes of user:
the owner (the user who owns the file), the group (a group of
users), and other (everyone else). Each class can be granted three permissions:
read (value 4), write (value 2) and execute
(value 1). Add the values you want for a class to get its octal digit — read + execute = 4 + 1 = 5,
read + write = 4 + 2 = 6, all three = 7 — and stack the three digits into the number you pass to
chmod. So chmod 640 file means owner 6 (read + write), group 4 (read),
other 0 (nothing).
The same permissions are written symbolically as nine characters — three groups of
rwx for owner, group and other, with a dash where a permission is off. 755
is rwxr-xr-x; 644 is rw-r--r--. This calculator keeps the
tick-boxes, the octal number, the symbolic string and the ready-to-run chmod command in
sync — change any one and the rest update instantly.
Common permissions
The symbolic column is computed from the octal value, not looked up — so it is always correct:
| Octal | Symbolic | Typical use |
|---|---|---|
644 | rw-r--r-- | Default for files — owner reads/writes, everyone else read-only. |
755 | rwxr-xr-x | Default for directories, scripts & programs — owner full, others read + run. |
600 | rw------- | Private file — only the owner can read and write (SSH keys, credentials). |
700 | rwx------ | Private directory or script — only the owner has any access. |
775 | rwxrwxr-x | Owner + group full, others read + execute — a collaborative directory. |
664 | rw-rw-r-- | Owner + group read/write, others read-only — group-shared file. |
640 | rw-r----- | Owner read/write, group read, others none — group-shared config. |
750 | rwxr-x--- | Owner full, group read + execute, others none — group-shared program. |
444 | r--r--r-- | Read-only for everyone. |
400 | r-------- | Read-only for the owner only. |
711 | rwx--x--x | Owner full; group & others may traverse a directory but not list it. |
777 | rwxrwxrwx | Everyone can read, write and execute — insecure, avoid on shared systems. |
Read, write & execute — files vs directories
| Permission | On a file | On a directory |
|---|---|---|
r read (4) | View the file’s contents. | List the names of entries inside. |
w write (2) | Modify or overwrite the file. | Create, rename or delete entries inside. |
x execute (1) | Run the file as a program/script. | Enter the directory and access files by name (“search”). |
Special permission bits
A fourth, leading octal digit holds three special bits. They are optional and off by default — tick “Show special permission bits” in the tool to set them.
| Bit | Octal | Symbolic | What it does |
|---|---|---|---|
| setuid | 4000 | s (user execute) | Runs an executable with the file OWNER’s privileges instead of the caller’s. Shows as s (or S if execute is off) in the owner triad. Classic example: /usr/bin/passwd. |
| setgid | 2000 | s (group execute) | On a file, runs it with the GROUP’s privileges. On a directory, new files inherit the directory’s group — useful for shared folders. Shows as s / S in the group triad. |
| sticky bit | 1000 | t (other execute) | On a directory, only a file’s owner (or root) can delete or rename it, even if others can write — used on world-writable dirs like /tmp. Shows as t / T in the other triad. |
In symbolic notation a special bit replaces the execute character: lowercase (s,
t) when execute is also on, uppercase (S, T) when it is off.
For example chmod 4755 is rwsr-xr-x, and chmod 1777 (a
sticky, world-writable directory like /tmp) is rwxrwxrwt.
Using it on the command line
Copy the chmod command and run it in a terminal, replacing filename with
your path. Add the -R option to apply the permission recursively to a directory and
everything inside it — handy, but double-check the number first, because a recursive
777 or an accidental execute bit on data files is a common mistake. You can also apply
permissions relatively with symbolic operators (e.g. chmod u+x script.sh to add execute
for the owner only); this tool focuses on computing the absolute octal and symbolic values.
Privacy
This calculator is pure client-side arithmetic — the values you enter never leave your device, nothing is logged and there are no network requests. It keeps working offline once loaded.
Frequently asked questions
- What does chmod 755 mean?
- It sets three permission digits — one each for the owner, the group and everyone else (“other”). Each digit adds read (4), write (2) and execute (1). So 7 = 4+2+1 = read, write and execute; 5 = 4+1 = read and execute. chmod 755 therefore gives the owner full access and gives the group and everyone else read + execute but not write. In symbolic form that is rwxr-xr-x. It is the standard setting for directories, scripts and programs.
- What is the difference between octal and symbolic notation?
- They describe the same permissions two ways. Octal (numeric) is the three- or four-digit number like 755 or 4755, where each digit is the sum of read (4), write (2) and execute (1) for owner, group and other. Symbolic is the nine-character string like rwxr-xr-x, split into three r/w/x groups for owner, group and other, with a dash where a permission is off. This tool shows both at once and lets you type either — set the tick-boxes and read off the number, or paste a number or symbolic string to see the boxes.
- What do read, write and execute mean for a file versus a directory?
- For a FILE: read lets you view its contents, write lets you change or overwrite it, and execute lets you run it as a program or script. For a DIRECTORY the meanings differ: read lets you list the names inside it, write lets you create, rename or delete entries within it, and execute (often called the “search” bit) lets you enter the directory and access files inside it by name. That is why directories usually need execute (e.g. 755) while plain data files usually do not (e.g. 644).
- What are setuid, setgid and the sticky bit?
- They are three optional “special” permission bits stored in a leading fourth octal digit (setuid 4, setgid 2, sticky 1). setuid makes an executable run with the file owner’s privileges; setgid makes it run with the group’s privileges, or makes a directory pass its group to new files; the sticky bit on a directory stops users from deleting each other’s files (as on /tmp). In symbolic form they replace the execute character with s/S (setuid, setgid) or t/T (sticky) — a lowercase letter when execute is also set, uppercase when it is not. Tick “Show special permission bits” above to set them.
- Is chmod 777 safe?
- Almost never. 777 grants read, write AND execute to everyone on the system, so any user (or a compromised process) can modify or replace the file or its contents. It is a common but risky “fix” for permission errors. Prefer the least permission that works — usually 644 for files and 755 for directories and scripts, tightening the group/other digits when the data is sensitive (e.g. 600 or 640).
- Is anything uploaded or saved?
- No. The whole calculator is plain JavaScript running in your browser — it only does small bit-arithmetic on the numbers and letters you enter. Nothing is sent to a server, nothing is stored, and it keeps working offline once the page has loaded.