The CHMOD Calculator helps you quickly determine and correctly set file and directory permissions in Unix-like systems (Linux, macOS, BSD). The tool converts permissions between symbolic and numeric (octal) formats, visualizes access rights, and generates ready-to-use terminal commands.
This is especially important for server administration, web application deployment, CI/CD pipelines, containers, and storage systems.
What CHMOD Permissions Are
In Unix systems, access to a file is defined for three user groups:
User (u) — the file owner or assigned user.
Group (g) — users who belong to the file’s group.
Others (o) — all other system users.
Each group can have three types of permissions (r, w, x):
Permission | Symbol | Octal | For Files | For Directories |
|---|
Read | r | 4 | Read file contents | List directory contents |
Write | w | 2 | Modify file | Create, delete, rename files |
Execute | x | 1 | Run as program/script | Enter directory (cd) and access items inside |
Without the execute (x) permission, a directory is effectively inaccessible — even if read (r) permission is granted.
The sum of values determines the final permission number for each user group.
Permission Values Reference
Access Level | Symbolic | Calculation | Octal |
|---|
Full access | rwx | 4+2+1 | 7 |
Read & write | rw- | 4+2 | 6 |
Read & execute | r-x | 4+1 | 5 |
Read only | r-- | 4 | 4 |
Write & execute | -wx | 2+1 | 3 |
Write only | -w- | 2 | 2 |
Execute only | --x | 1 | 1 |
No access | --- | 0 | 0 |
Popular Permission Settings
Use Case | Symbolic | Octal |
|---|
Full access (NOT recommended) | rwxrwxrwx | 777 |
Shared group directories | rwxrwxr-x | 775 |
Shared group files | rw-rw-r-- | 664 |
Private directories and scripts | rwx------ | 700 |
Private files (SSH keys, passwords) | rw------- | 600 |
Directories & executable scripts | rwxr-xr-x | 755 |
Standard web files (HTML, CSS, images) | rw-r--r-- | 644 |
When running the chmod command, you can control how results are displayed:
Verbose (-v) — detailed output showing changes for each processed file.
Changes (-c) — display only files whose permissions were actually modified.
Silent (-f) — suppress error messages (for example, permission denied or missing files).
Default — standard mode showing only critical messages (such as errors), without details on successful operations.
Permission Application Options
These settings control how and where permissions are applied:
Recursive (-R) — apply permissions to a directory and all its contents, including subdirectories, files, and symbolic links (behavior may vary by system).
Reference File (--reference=FILE_NAME) — copy permissions from an existing file instead of specifying a numeric mode.
Special Permission Bits:
Setuid (+s for owner). Executable runs with the file owner’s privileges instead of the user who launched it.
Setgid (+g). Behavior depends on object type: for files (executable runs with the file’s group privileges), for directories (newly created files inherit the directory’s group, simplifying team collaboration).
Sticky Bit (+t). Mainly used on shared directories. Allows users to delete or rename only the files they own (commonly used on /tmp).