induwara.lk
induwara.lkDeveloper · Utility

Chmod Calculator — Linux File Permission Calculator

Tick the read, write and execute bits for owner, group and other to get the octal code (755), the symbolic string (-rwxr-xr-x) and the exact chmod command. Paste an octal code or an ls -l string and it decodes the other way. Runs in your browser, no signup.

By Induwara AshinsanaUpdated Jun 11, 2026
Chmod permission calculatoroctal ↔ symbolic
Class
Read
Write
Execute
Owner
Group
Others

Special bits

1–4 digits, each 0–7. A 4th leading digit sets special bits.

9 characters, ls -l style. Paste rwxr-xr-x or -rwxr-xr-x.

Common
Octal
644
With special bits
0644
Symbolic
-rw-r--r--
Assignment
u=rw,g=r,o=r

Run this command

chmod 644 filename
chmod u=rw,g=r,o=r filename

Who can do what

Class
Read
Write
Execute
Owner
Group
Others

Runs entirely in your browser — nothing is uploaded. Values follow the POSIX and GNU Coreutils sources cited below the calculator.

How it works

A Linux file carries nine permission bits — read, write and execute for three classes of user: the owner, the file's group, and everyone else (others). The chmod command sets those bits, and this calculator converts between the two notations people use to express them: octal and symbolic.

  1. Each permission has a value. Read = 4, write = 2, execute = 1. These are the mode-bit constants in the Linux chmod(2) man page.
  2. Add the values per class. For each of owner, group and other, sum the bits you want. Owner rwx = 4+2+1 = 7; a group with r-x = 4+0+1 = 5. Every digit lands between 0 and 7.
  3. Concatenate owner-group-other. Write the three digits in order to get the octal code, e.g. 7,5,5 → 755.
  4. Special bits become a leading 4th digit. setuid = 4, setgid = 2, sticky = 1, summed into an optional first digit: 4755, 1777. These map to the kernel constants S_ISUID (04000), S_ISGID (02000) and S_ISVTX (01000).
  5. Symbolic rendering. Each bit becomes r/w/x or a dash. A special bit overlays the execute slot per the GNU Coreutils manual: setuid/setgid show s when execute is on or S when it is off; the sticky bit shows t or T in the others slot.
  6. Decoding is the reverse. An octal string is split right-to-left into other, group and owner digits (plus an optional special digit), and each digit is decomposed by testing the 4/2/1 bits. A 9-character symbolic string is read slot by slot, treating s/tas “special + execute on” and S/Tas “special, execute off”.

The whole computation is exact integer arithmetic — no rounding and no external data, so the result never goes stale. The calculator also runs an internal consistency check: it re-derives the octal value from the symbolic string it just rendered and confirms the two agree, the same cross-check used in the worked examples below.

Worked examples

755 — directories and scripts

755-rwxr-xr-x

  1. Owner rwx = 4 + 2 + 1 = 7
  2. Group r-x = 4 + 0 + 1 = 5
  3. Other r-x = 4 + 0 + 1 = 5
  4. Concatenate → 755, symbolic -rwxr-xr-x
  5. Command: chmod 755 script.sh

644 — regular files (the default)

644-rw-r--r--

  1. Owner rw- = 4 + 2 + 0 = 6
  2. Group r-- = 4 + 0 + 0 = 4
  3. Other r-- = 4 + 0 + 0 = 4
  4. Concatenate → 644, symbolic -rw-r--r--
  5. Only the owner can edit; everyone else is read-only.

4755 — setuid binary (e.g. /usr/bin/passwd)

4755-rwsr-xr-x

  1. Special: setuid = 4 → leading digit
  2. Base 755 as above
  3. Execute is on in the owner slot, so x becomes a lowercase s
  4. Concatenate → 4755, symbolic -rwsr-xr-x
  5. Command: chmod 4755 /usr/bin/passwd

1777 — sticky directory (e.g. /tmp)

1777drwxrwxrwt

  1. Special: sticky = 1 → leading digit
  2. Base 777 (rwx for all three classes)
  3. Others execute is on, so x becomes a lowercase t
  4. Concatenate → 1777, symbolic drwxrwxrwt for a directory
  5. Everyone can write, but only an owner can delete their own files.

Frequently asked questions

Sources & references

The bit values, symbolic-rendering rules and worked examples on this page were last cross-checked against these sources on 2026-06-11. The chmod specification has been stable for decades, so this tool needs no rate or data updates.

Related tools

Rate this tool
Be the first to rate

Comments & feedback

Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.

Found a bug, edge case, or want to suggest an improvement?

Email me at [email protected] — most fixes ship within 24 hours.