Chmod Calculator

Pick read, write, and execute permissions for owner, group, and others to get the numeric (octal) mode, the symbolic notation, and a ready-to-run chmod command.

Quick Facts

Formula
Digit = 4×read + 2×write + 1×execute
Applied separately to owner, group, and others (values 0-7).
Digit order
Owner, then group, then others
Mode 750 = owner rwx, group r-x, others no access.
Special bits
Setuid 4, setgid 2, sticky 1
Written as an optional fourth leading digit, e.g. 4755.

Your Results

Calculated
Numeric (octal) mode
-
Use with chmod
Symbolic notation
-
As shown by ls -l
Chmod command
-
Run in a terminal
Access summary
-
Plain-language permissions

Ready

Choose permissions for owner, group, and others, then press Calculate.

Understanding Chmod and Unix File Permissions

On Unix and Linux systems, every file and directory carries a set of permissions for three categories of user: the owner, the group, and others (everyone else). Each category can be granted read (r), write (w), and execute (x) access. The chmod ("change mode") command sets these permissions, either with a symbolic string like rwxr-xr-x or with a three-digit numeric (octal) mode like 755.

The formula

Each permission digit is calculated by summing weighted bits, whichever of the three are granted for that category:

  • Read is worth 4
  • Write is worth 2
  • Execute is worth 1

Add the values for whatever is granted: read + write + execute = 4 + 2 + 1 = 7 (full access). Read + execute with no write = 4 + 1 = 5. No permissions at all = 0. The full mode is three such digits written in order — owner, then group, then others — so 755 means the owner gets 7 (rwx), while the group and others each get 5 (r-x).

Special permissions

An optional fourth digit, placed before the other three, sets special permissions: setuid = 4 (the program runs with the file owner's privileges), setgid = 2 (it runs with the file's group privileges, and on directories new files inherit that group), and the sticky bit = 1 (on a shared directory, only a file's owner, the directory owner, or root can delete or rename it). These add together the same way — setuid plus sticky is 4 + 1 = 5, shown as a leading digit, e.g. 4755 or 5755. In symbolic notation, an active setuid or setgid bit replaces the owner's or group's execute character with s (or S if execute is not also set), and an active sticky bit replaces others' execute character with t (or T).

Common permission presets

  • 755 (rwxr-xr-x): the owner can read, write, and execute; everyone else can read and execute. Typical for scripts, programs, and directories.
  • 644 (rw-r--r--): the owner can read and write; everyone else can only read. Typical for ordinary documents and web assets.
  • 700 (rwx------): only the owner has any access at all. Common for private scripts or SSH key directories.
  • 600 (rw-------): only the owner can read or write; nobody else has access. Common for private keys and credential files.
  • 750 (rwxr-x---): owner has full access, the group can read and execute, and others have nothing.

Frequently Asked Questions

What does chmod 755 mean?
755 is three octal digits for owner, group, and others. Each digit sums read (4), write (2), and execute (1): 7 = rwx (full access) for the owner, and 5 = r-x (read and execute, no write) for the group and others. In symbolic form that is rwxr-xr-x — a common setting for scripts, executables, and directories.
How is the numeric chmod value calculated?
Each of the three permission categories gets a digit from 0-7 equal to 4 times read, plus 2 times write, plus 1 times execute, whichever of those are granted. Read and write with no execute is 4 + 2 = 6. The three digits are written in owner-group-other order to form the mode, such as 644 or 755.
What do setuid, setgid, and sticky bit do?
These are special permissions set with an optional fourth leading digit. Setuid (4) makes an executable run with its owner's privileges regardless of who runs it. Setgid (2) does the same for the owning group, and on a directory makes new files inherit that group. The sticky bit (1) on a directory stops users from deleting or renaming files they do not own, even when the directory itself is writable by everyone.
How do I apply a chmod value to a file?
Run chmod followed by the mode and the filename in a terminal, for example chmod 755 script.sh. Add -R before the mode to apply it recursively to every file and subdirectory, for example chmod -R 755 folder/. You need to own the file or have superuser (sudo) access to change its permissions.