Quick Answer
A chmod calculator converts Linux file permission settings into the octal codes (like 644 or 755) used by the chmod command. Set read, write, and execute permissions for owner, group, and others — the calculator outputs the octal value and the exact chmod command to copy into your terminal.
Chmod Calculator — Free
Toggle permission checkboxes and get the octal code, symbolic notation, and ready-to-copy chmod command instantly.
Open Chmod Calculator →Every file on a Linux or Unix system has a set of permissions that control who can read it, write to it, or execute it — and those permissions apply separately to the file owner, the owner's group, and everyone else. The chmod command sets these permissions using either a three-digit octal number (like 755) or symbolic notation (like u+x). Getting the number wrong means either locking yourself out of a file or leaving it dangerously open.
This guide explains how the octal system works, what the most common chmod values mean, when to use each one, and how to use the calculator above to generate the right command without mental arithmetic.
Advertisement
What Is chmod?
chmod stands for change mode. It is a Unix command that modifies the read, write, and execute permissions of a file or directory. Permissions are assigned to three classes of users:
| Class | Symbol | Who it covers |
|---|---|---|
| Owner | u | The user who owns the file |
| Group | g | Users in the file's assigned group |
| Others | o | Everyone else on the system |
Each class gets three permission bits: r (read = 4), w (write = 2), and x (execute = 1). The octal digit for each class is the sum of the bits that are switched on.
The Octal Permission System — 4, 2, 1 Explained
Each permission is a power of 2. Add together the values of the permissions you want for a class to get its octal digit:
| Permission | Symbol | Value | What it allows |
|---|---|---|---|
| Read | r | 4 | View file contents; list directory contents |
| Write | w | 2 | Modify file contents; create/delete files in a directory |
| Execute | x | 1 | Run file as a program; enter a directory (cd) |
| None | - | 0 | No access |
A three-digit octal code represents owner, group, and others in that order. For example, 755 breaks down as:
| Digit | Class | Calculation | Permissions | Symbolic |
|---|---|---|---|---|
| 7 | Owner | 4+2+1 | Read, write, execute | rwx |
| 5 | Group | 4+0+1 | Read, execute | r-x |
| 5 | Others | 4+0+1 | Read, execute | r-x |
Combined symbolic notation for 755: rwxr-xr-x. The chmod calculator does this arithmetic for you — check a box and the octal updates instantly.
Common chmod Values and When to Use Them
These are the permission presets built into the calculator, covering the most common real-world scenarios for files, directories, and security-sensitive paths.
| Octal | Symbolic | Label | Use case |
|---|---|---|---|
| 644 | rw-r--r-- | Regular file | HTML, config, text files — owner edits, others read |
| 755 | rwxr-xr-x | Executable / Dir | Scripts, binaries, directories — others can enter and run |
| 664 | rw-rw-r-- | Group editable file | Shared project files where the group needs write access |
| 600 | rw------- | Private file | SSH keys, credentials — only owner can read or write |
| 700 | rwx------ | Private directory | Only owner has any access to the directory |
| 400 | r-------- | Owner read only | Immutable config files, certificates |
| 750 | rwxr-x--- | Group access dir | Owner full access, group can read and enter, others locked out |
| 775 | rwxrwxr-x | Group writable dir | Shared directories where the group needs to create files |
| 711 | rwx--x--x | Traversal only dir | Others can enter the directory but not list its contents |
| 444 | r--r--r-- | Read-only for all | Shared read-only resources, documentation |
| 777 | rwxrwxrwx | Full access | Avoid on servers — everyone can modify or delete |
Note: Never use 777 on a production server. If a web server process is compromised, 777 permissions let an attacker overwrite any file in that directory. Use 755 for directories and 644 for files as your safe defaults.
Symbolic vs Octal Notation
Both notations set the same permissions — they just express them differently. Octal sets an absolute permission mask; symbolic adds or removes individual bits.
| Goal | Octal command | Symbolic command | Note |
|---|---|---|---|
| Make script executable | chmod 755 script.sh | chmod +x script.sh | Symbolic +x is shorter but adds execute for all |
| Lock down a private key | chmod 600 id_rsa | chmod u=rw,go= id_rsa | Octal is cleaner here |
| Standard web file | chmod 644 index.html | chmod u=rw,go=r file | Either works; octal is conventional |
| Remove write for group | chmod 644 file | chmod g-w file | Symbolic is better for targeted changes |
| Full private directory | chmod 700 dir/ | chmod u=rwx,go= dir/ | Octal is simpler |
Tip: Use octal when setting permissions from scratch (it defines all three classes at once). Use symbolic when making targeted changes to existing permissions without touching the other bits.
Special Permission Bits: setuid, setgid, Sticky Bit
A fourth octal digit (placed before the three standard digits) controls three special bits. The calculator exposes these as checkboxes — they are rarely needed but important to understand.
| Bit | Value | Example | Effect |
|---|---|---|---|
| setuid | 4000 | 4755 (rwsr-xr-x) | Executable runs with the file owner's privileges, not the caller's. Used by /usr/bin/passwd to write /etc/shadow. |
| setgid | 2000 | 2755 (rwxr-sr-x) | On executables: runs with group privileges. On directories: new files inherit the directory's group instead of the creator's. |
| sticky | 1000 | 1777 (rwxrwxrwt) | On directories: users can only delete their own files. Used on /tmp and shared upload directories. |
chmod vs chown — Permissions vs Ownership
These two commands are frequently confused but do completely different things:
| Command | Controls | Example | Result |
|---|---|---|---|
| chmod | What actions are allowed | chmod 644 file.txt | Owner can read/write; group and others can only read |
| chown | Who owns the file | chown alice:dev file.txt | alice becomes owner; dev becomes the group |
Open Chmod Calculator — Free
Click the permissions you need and copy the ready-made chmod command — no arithmetic required.
Open Chmod Calculator →