AbraCalc

chmod Calculator

Convert Unix file permissions (read, write, execute for owner, group, other) to the octal chmod code. Essential for Linux and macOS developers.

Embed this tool on your site

How to use this tool

  1. Set owner, group, and other permissions (0–7).
  2. Add permission bits: 4 = read (r), 2 = write (w), 1 = execute (x).
  3. Copy the octal code and run: chmod 754 filename

Convert read/write/execute permissions for owner, group, and other into the numeric octal chmod code used on Linux and macOS.

Formula

Each permission digit is the sum of its active bits: r = 4, w = 2, x = 1.

Octal code = owner_digit group_digit other_digit, where each digit ∈ {0…7}.

Symbolic form: for each digit n, bit-test n & 4r or -; n & 2w or -; n & 1x or -.

How it works

This calculator converts three separate octal permission values (owner, group, other) into a Unix chmod octal code and its equivalent nine-character symbolic string. Each digit is treated as a 3-bit field where the bits independently represent read, write, and execute access. The result is exact — Unix permission encoding is purely arithmetic with no rounding or estimation involved.

Worked example

Worked example

  1. Owner = 7: bits 4+2+1 are all set → read, write, execute → rwx
  2. Group = 5: bits 4+1 are set (not 2) → read, execute, no write → r-x
  3. Other = 4: only bit 4 is set → read only → r--
  4. Octal code: concatenate the three digits → 754
  5. Symbolic: concatenate the three rwx strings → rwxr-xr--

Octal code: 754 | Symbolic: rwxr-xr--

Key terms

Octal notation
A base-8 number system used to represent Unix permissions; each digit (0–7) encodes three permission bits in a single character.
Read (r)
Permission bit with value 4; allows a user to view the contents of a file or list a directory.
Write (w)
Permission bit with value 2; allows a user to modify or delete a file, or create/remove files within a directory.
Execute (x)
Permission bit with value 1; allows a user to run a file as a program or enter a directory.
Symbolic notation
A nine-character string (e.g. rwxr-xr--) representing owner, group, and other permissions in human-readable form.

Frequently asked questions

What does chmod 755 mean?
755 means: owner has read+write+execute (7), group has read+execute (5), others have read+execute (5). Symbolic: rwxr-xr-x. Common for executables and directories.
What is chmod 644?
644 means owner can read+write (6), group and others can only read (4). Symbolic: rw-r--r--. Standard for web files and config files.

References & sources