Developer Tools

chmod Calculator

Convert Unix file permissions between octal and symbolic forms, with special bits and the chmod command.

By Nitin Raturi · Last reviewed

File mode

How to use the chmod Calculator

Convert Unix file permissions between octal and symbolic forms.

  1. Type a mode such as 644, 4755 or rwxr-x---.
  2. Read the other form and who can read, write and run the file.
  3. Copy the chmod command.

Good to know

  • Read is 4, write is 2 and execute is 1; add them for each of owner, group and others.

Permissions

A file mode in octal (755) or symbolic form (rwxr-xr-x), as ls -l shows it.

How to fill it in

  • Octal: three digits, or four with set-ID and sticky bits (4755).
  • Symbolic: nine characters, with or without the leading file-type character.

Example

755 is rwxr-xr-x; 644 is rw-r--r--; 600 is rw-------. rw-r----- is 640.

Tip: 4755 adds set-user-ID: rwsr-xr-x. 1777, used for shared temporary folders, is rwxrwxrwt.

Keep in mind: Avoid 777 on servers: it lets every user change the file.

Permissions

755 = rwxr-xr-x

chmod 755 gives owner read, write, execute; group read, execute; others read, execute.

Who can do what
ClassReadWriteExecute
owneryesyesyes
groupyesnoyes
othersyesnoyes
Command
chmod 755 file or chmod u=rwx,g=rx,o=rx file
Special bits
set-user-ID no, set-group-ID no, sticky no

POSIX permission bits. For directories, execute means permission to enter, and the sticky bit stops users deleting each other’s files.

How this calculator works

  1. Step 1Addr 4, w 2, x 1One digit per class.
  2. Step 2Classesowner, group, othersLeft to right.
  3. Step 3Special4000, 2000, 1000set-user-ID, set-group-ID, sticky.

Each octal digit is a sum: 4 for read, 2 for write and 1 for execute. The three digits are the owner, the group and everyone else, in that order.

A fourth leading digit adds the special bits. In the symbolic form these show as s or S in place of the execute letter, and t or T for the sticky bit.

Worked example: 755

chmod 755
Digit
read 4 + write 2 + execute 1
  1. Owner: 74 + 2 + 1rwx
  2. Group: 54 + 1r-x
  3. Others: 54 + 1r-x
  4. Symbolicrwxr-xr-x

Read the result

  • 644rw-r--r--Ordinary files: owner edits, others read.
  • 600rw-------Private files such as keys.

Special bits change the letters: 4755 is rwsr-xr-x and 1777 is rwxrwxrwt.

Assumptions and limits

  • POSIX bitsAs defined for the chmod utility.
  • DirectoriesExecute means permission to enter.
  • No ACLsAccess control lists are separate.
  • Capital S or TSpecial bit set without execute.

File permissions are three octal digits, each made of three bits.

To work through the bits yourself, use the binary calculator. For other number bases, the hex calculator shows every base at once.

Common mistakes

  • Mistake: Using 777 to fix a permission error.

    Instead: Give the least access that works, such as 755 or 644.

  • Mistake: Reading 750 as owner 7, others 5.

    Instead: The middle digit is the group.

Checking the method

A separate script turns every mode into its ls-style string with Python’s stat.filemode and matches each golden value.

Read how we test our calculators, or browse more developer tools.

Frequently asked questions

What does chmod 755 mean?

rwxr-xr-x: the owner can read, write and run; group and others can read and run.

What is 644?

rw-r--r--: the usual mode for ordinary files.

What is rw-r----- in octal?

640: read and write for the owner, read for the group.

What does the s in rwsr-xr-x mean?

The set-user-ID bit (4000): 4755 is rwsr-xr-x. The program runs with its owner’s rights.

What is the sticky bit?

1000, shown as t: 1777 is rwxrwxrwt, used for shared folders where users may delete only their own files.

Sources and methodology

The formulas are standard time-value-of-money results. We check every figure against golden values worked out independently, by closed form and by month-by-month simulation; see the methodology.

Written and maintained by Nitin Raturi, a software engineer (about the author). Last reviewed 4 Nov 2026; next review due by . Found an error? Tell us.

Changelog

  • : Initial release.