How this chmod calculator works
On Unix and Linux systems, every file and directory carries permissions for three classes of user: the owner, the group, and other (everyone else). Each class can independently be allowed to read, write and execute. The chmod command changes those permissions.
The numeric (octal) mode encodes each class as one digit. Within a digit, read is worth 4, write is worth 2 and execute is worth 1. You add up the values for the permissions you want to grant, so a digit ranges from 0 (no access) to 7 (full access). The three digits, in order, are owner, group and other.
rwxr-xr-x — the typical mode for directories and runnable scripts.Common permission modes
| Octal | Symbolic | Meaning |
|---|---|---|
| 644 | rw-r--r-- | Standard files: owner can read/write, everyone else read only. |
| 755 | rwxr-xr-x | Directories & scripts: owner full access, others read/execute. |
| 600 | rw------- | Private files: only the owner can read or write (e.g. keys). |
| 700 | rwx------ | Private directories/scripts: only the owner has any access. |
| 777 | rwxrwxrwx | Everyone can read, write and execute — rarely safe. |
Reference note: this tool covers the standard read/write/execute bits for owner, group and other. Special bits (setuid, setgid and the sticky bit) form an optional fourth leading digit and are not changed here.
Frequently asked questions
- What does chmod 755 mean?
- chmod 755 gives the owner read, write and execute (7 = 4+2+1) and gives the group and other read and execute only (5 = 4+1). The symbolic form is rwxr-xr-x. It is the usual setting for directories and executable scripts that everyone may run but only the owner may change.
- How are chmod permission numbers calculated?
- Each permission has a value: read = 4, write = 2, execute = 1. You add the values for the permissions you want, separately for owner, group and other, to get a digit from 0 to 7. The three digits together form the octal mode, so read+write+execute = 4+2+1 = 7 and read+execute = 4+1 = 5.
- What is chmod 644 used for?
- chmod 644 gives the owner read and write (6 = 4+2) and gives the group and other read only (4). The symbolic form is rw-r--r--. It is the standard permission for regular files such as documents, web pages and configuration files that should be readable by all but writable only by the owner.
- What is the difference between owner, group and other?
- Owner is the user who owns the file. Group is the set of users in the file's group. Other (sometimes called world or public) is everyone else on the system. Each of the three classes gets its own read, write and execute settings, which is why an octal mode has three digits.
- Is chmod 777 safe?
- Usually not. chmod 777 grants read, write and execute to everyone, so any user can modify or replace the file. It is rarely needed and is a common security risk, especially on web servers. Prefer 644 for files and 755 for directories and scripts, and tighten further when possible.
- What is symbolic notation in chmod?
- Symbolic notation is the nine-character string shown by ls -l, such as rwxr-xr-x. The first three characters are the owner's permissions, the next three are the group's, and the last three are other's. A letter (r, w, x) means the permission is granted and a dash means it is not.