Chmod Calculator

Tick the permissions you want, or type a number like 755, to get the chmod command for Linux and Mac.

FreeNo sign-upPrivate — runs in your browser
ReadWriteExecuteValue

Common:

How to use the Chmod Calculator

  1. Choose the permissionsTick read, write and execute for the owner, the group and everyone else, or click a common preset.
  2. Or type a valueEnter a number like 644 or a symbolic value like rw-r--r--, and the boxes update.
  3. Copy the commandAdd your file name and copy the chmod command to run in the terminal.

Example

755 = rwxr-xr-x: the owner can read, write and run; everyone else can read and run. Typical for folders and scripts.

644 = rw-r--r--: the owner can read and write; others can only read. Typical for web files.

Frequently asked questions

How do the numbers work?

Each digit is a sum: read = 4, write = 2, execute = 1. So 7 = 4 + 2 + 1 (all), 6 = read + write, 5 = read + execute and 4 = read only. The three digits are owner, group and others.

Is chmod 777 safe?

Rarely. It lets every user on the system change and run the file, which is a security risk, especially on web servers. Use 755 for folders and 644 for files instead.

What are setuid, setgid and the sticky bit?

A fourth digit in front: setuid (4) runs a program as its owner, setgid (2) runs it as its group or makes new files in a folder inherit the group, and the sticky bit (1) on a folder like /tmp stops users deleting each other’s files.

Popular posts from this blog

Character Counter

Speech to Text Online

Keyboard Tester