Mini Tools

Chmod Calculator

Tick permissions or type a numeric (755) or symbolic (rwxr-xr-x) mode — everything stays in sync.

Read (4)Write (2)Execute (1)
Owner (user)
Group
Others

How Linux file permissions work

Every file has three permission sets — for the owner, the group and others — and each set has read (4), write (2) and execute (1) bits. Adding the bits gives one octal digit per set: rwx = 4+2+1 = 7, r-x = 4+1 = 5, r-- = 4. So rwxr-xr-x is 755.

Common permission modes

ModeSymbolicTypical use
644rw-r--r--Regular files, web pages, configs readable by everyone
755rwxr-xr-xDirectories, scripts and programs
600rw-------Private files: SSH keys, .env, credentials
700rwx------Private directories such as ~/.ssh
664 / 775rw-rw-r-- / rwxrwxr-xFiles/directories shared by a team group
777rwxrwxrwxEveryone can write — avoid, especially on web servers

Special bits

  • setuid (4000) — an executable runs with the file owner’s privileges (e.g. /usr/bin/passwd). Shown as s in the owner’s execute slot.
  • setgid (2000) — runs with the group’s privileges; on a directory, new files inherit the directory’s group.
  • sticky (1000) — on a directory, only a file’s owner can delete or rename it (e.g. /tmp is 1777). Shown as t.

A capital S or T means the special bit is set but the underlying execute bit is not.

Frequently asked questions

What does chmod 755 mean?

Owner can read, write and execute (7); group and others can read and execute (5). Symbolic: rwxr-xr-x. It is the usual mode for directories and scripts.

What is the difference between 644 and 755?

755 adds the execute permission for everyone. Use 644 for ordinary files and 755 for directories and executable scripts.

Why is chmod 777 dangerous?

It lets every user on the system modify or replace the file. On a web server that can allow attackers to change your code. Grant only the permissions you need.

How do I apply permissions recursively?

Use chmod -R, but be careful: files and directories usually need different modes. A common pattern is find . -type d -exec chmod 755 {} + and find . -type f -exec chmod 644 {} +.