CodingBubbleCodingBubble

Chmod Calculator

Calculate Unix file permissions with an interactive visual grid.

755
-rwxr-xr-x
Read (4)
Write (2)
Execute (1)
Owner
Group
Others

Command

chmod 755 filename

ls -l preview

-rwxr-xr-x 1 user group 0 Mar 7 12:00 filename

Common Presets

Unix File Permissions Reference

Unix permissions are represented as three octal digits (owner, group, others). Each digit is a sum of: Read (4), Write (2), Execute (1). For example, 755 means owner can read/write/execute, while group and others can read/execute.

How the chmod calculator works

Tick read, write and execute for the owner, group and others, or type a three-digit octal value. The calculator shows the matching symbolic permissions, an ls -l preview and the command to run.

Common permission values

755 (rwxr-xr-x) suits directories and executable scripts. 644 (rw-r--r--) suits ordinary files. 600 (rw-------) keeps a file private to its owner, and 400 (r--------) is a common choice for SSH private keys. 700 (rwx------) is a private directory or script.

Files and directories behave differently

On a file, execute means it can be run as a program. On a directory, execute allows entering it and reaching the files inside, and read allows listing their names. Write permission on a directory allows creating, renaming and deleting entries.

Changing many files safely

Running chmod -R 755 also makes every ordinary file executable. Use chmod -R u=rwX,go=rX folder instead: the capital X adds execute only to directories and to files that are already executable.

Frequently asked questions

What does chmod 755 mean?

The owner can read, write and execute. The group and others can read and execute.

What does chmod 644 mean?

The owner can read and write. The group and others can only read.

Is chmod 777 safe?

Usually not. It lets every user on the system modify and execute the file. Grant only the access that is needed.

What permissions should an SSH key have?

Use 600 or 400 for a private key, so only its owner can read it.

Related tools