Chmod Calculator

Build Linux file permissions with checkboxes and convert between octal (755) and symbolic (rwxr-xr-x).

ReadWriteExecute
Owner
Group
Others
Command
chmod 755 file
rwxr-xr-x

Reading permissions

Each file has three sets of permissions — owner, group and everyone else — and each set has read (4), write (2) and execute (1). Add the numbers for each set to get the octal digit:

rwx = 4+2+1 = 7
r-x = 4+0+1 = 5
r-- = 4+0+0 = 4

rwxr-xr-x = 755    rw-r--r-- = 644

Directories

On a directory, read lets you list it, write lets you create and delete files in it, and execute lets you enter it (cd) and reach files inside. Directories almost always need execute wherever they have read.

Special bits

  • setuid (4000): a program runs as its owner — how passwd changes system files.
  • setgid (2000): on a directory, new files inherit its group.
  • sticky (1000): on a directory, only a file’s owner can delete it.

Common questions

What does chmod 755 mean?

Owner can read, write and execute (7); group and others can read and execute (5). It’s the usual mode for scripts, programs and directories.

What does chmod 644 mean?

Owner can read and write (6); everyone else can only read (4). The usual mode for ordinary files.

Should I use chmod 777?

Almost never. It lets every user on the system change or replace the file, which is a common security hole on web servers. Fix the ownership with chown instead.

What permissions does an SSH private key need?

600 or 400 — readable only by you. SSH refuses to use a private key that others can read.

What is the sticky bit?

On a directory, it stops users from deleting files they don’t own — /tmp is 1777 for this reason.

MathApps is free and ad-free for now. If it helped, buy us some art supplies — supporters never see ads, even if we add them.