Rates TodayNIFTY25,514.3+1.47%SENSEX83,021.8+1.75%Gold 24K ₹11,846.36/g down252.02Silver ₹143.04/g down3.42
InsightforGeeks

Chmod Calculator (Unix File Permissions)

Set Linux and Unix file permissions without remembering the numbers. Tick read, write and execute for the owner, the group and others and get the octal code (such as 755), the symbolic form (rwxr-xr-x) and ready-to-copy chmod commands. You can also type an octal or symbolic value, try a change like u+x,go-w, check the special setuid, setgid and sticky bits, and see what a umask gives new files.

Read (r)Write (w)Execute (x)Octal
Owner (u)7
Group (g)5
Others (o)5

Common settings

  • Owner: read, write and run
  • Group: read and run
  • Everyone else: read and run
chmod 755 file.txt
chmod u=rwx,g=rx,o=rx file.txt

Result: -rwxr-xr-x for a file. Use -R only when you mean to change everything inside a folder.

Try a chmod change

Type a change such as u+x, go-w, a=r or u=rwx,g=rx,o= to see what it does to the permissions above.

umask

The umask removes permissions from new files and folders. A common value is 022.

New files get 644 and new folders 755.

How to use it

  1. Tick the read, write and execute boxes for the owner, group and others. The octal and symbolic values update.
  2. Or type an octal value such as 644, or a symbolic one such as rwxr-xr-x, and the boxes follow.
  3. Enter your file name and copy the chmod command. Tick “Everything inside” only when you want to change a whole folder.
  4. Use “Try a chmod change” to see what an expression like u+x or g=rx does before you run it.

Frequently asked questions

What does chmod 755 mean?

The three digits are the permissions of the owner, the group and everyone else. Each digit adds read (4), write (2) and execute (1). So 7 is read, write and execute, and 5 is read and execute. chmod 755 lets the owner change the file and everyone run it, which is the usual setting for programs and public folders.

What are the common permission values?

644 (rw-r--r--) is normal for files: the owner can edit and others can read. 600 keeps a file private to its owner, which is right for SSH keys and secrets. 755 (rwxr-xr-x) suits programs and folders. 700 makes a folder private. 777 gives everyone full access, which is a security risk and is rarely the right answer.

What does execute mean on a folder?

On a folder, execute (x) means you may enter it and open the files inside. Read (r) lets you list the names, and write (w) lets you create, rename and delete files in it. A folder that cannot be entered is unusable even if you can read it, so folders normally need x wherever they need r.

What are setuid, setgid and the sticky bit?

They are extra bits in a fourth digit. Setuid (4) runs a program with its owner’s rights. Setgid (2) runs it with its group’s rights, and on a folder makes new files inherit the folder’s group. The sticky bit (1) on a shared folder such as /tmp lets only a file’s owner delete it. A leading 0 means none of them is set. On Linux, a three-digit chmod does not clear setuid and setgid on a folder, so use four digits to change them.

What is umask?

The umask is a mask that removes permissions from newly created files and folders. New files start from 666 and new folders from 777, and the umask is subtracted. With the common umask 022, files get 644 and folders get 755. With 077 they get 600 and 700.

How do I change a whole folder?

Add -R, as in chmod -R 755 folder. It changes every file and folder inside, so it can make files executable that should not be. A safer pattern is to set folders and files separately, or to use symbolic mode with a capital X (chmod -R u=rwX,go=rX folder), which adds execute only to folders and to files that were already executable.

Related tools

These tools run entirely in your browser and are provided free, without warranty. Check important results before using them in production.