Chmod Calculator
Calculate Linux file permissions with an interactive chmod calculator. Convert between numeric and symbolic notation. Free, runs in your browser.
What is chmod?
chmod (change mode) is a Linux and Unix command used to set file and directory permissions. It controls who can read, write, or execute a file. Permissions are assigned to three classes: the file owner, the group, and others (everyone else).
Permission reference
| Permission | Symbol | Octal value | Description |
|---|---|---|---|
| Read | r | 4 | View file contents or list directory |
| Write | w | 2 | Modify file or add/remove directory entries |
| Execute | x | 1 | Run file as a program or access directory |
| No permission | - | 0 | No access |
Common permissions
| Numeric | Symbolic | Use case |
|---|---|---|
| 755 | rwxr-xr-x | Executable files, public directories |
| 644 | rw-r--r-- | Regular files (HTML, CSS, images) |
| 600 | rw------- | Private files (SSH keys, config files) |
| 777 | rwxrwxrwx | Full access for everyone (use with caution) |
| 400 | r-------- | Read-only by owner (sensitive files) |
| 444 | r--r--r-- | Read-only for everyone |
Special bits
Linux supports three special permission bits, expressed as a fourth leading octal digit:
- Setuid (4): when set on an executable, the program runs
with the permissions of the file owner, not the user who launched it.
Example:
chmod 4755 file. - Setgid (2): similar to setuid but for the group. On
directories, new files inherit the directory's group. Example:
chmod 2755 dir. - Sticky bit (1): on directories, only the file owner can
delete or rename their files. Commonly used on
/tmp. Example:chmod 1777 /tmp.
Frequently Asked Questions
How do I calculate chmod values? Each permission has a numeric value: read = 4, write = 2, execute = 1. Add the values for each class. For example, read + write + execute = 7, read + execute = 5, read only = 4. So 755 means owner = 7 (rwx), group = 5 (r-x), others = 5 (r-x).
What is the difference between 755 and 644? 755 allows the owner to read, write, and execute, while group and others can read and execute. 644 allows the owner to read and write, while group and others can only read. Use 755 for scripts and directories, 644 for regular files.
Is chmod 777 safe? No. chmod 777 gives full read, write, and execute permissions to everyone on the system. This is a security risk and should be avoided on production servers. Use more restrictive permissions like 755 or 644 instead.
Is my data sent to a server? No. All calculations run entirely in your browser. Nothing is uploaded or stored.