Skip to content
codinganthem
All tools/chmod Calculator

chmod Calculator

Calculate Unix file permissions visually and get octal, symbolic, and chmod command output. Free chmod calculator with common presets (644, 755, and more).

ClassRead (4)Write (2)Execute (1)
Owner
Group
Public

Special bits

Octal
Symbolic
rw-r--r--
Command
chmod 644 file.txt

How chmod numbers work

Each permission has a value: read is 4, write is 2 and execute is 1. Add them up for each of the three classes, owner, group and everyone else (public), and you get one digit per class. Tick the boxes above and the calculator shows the octal number, the symbolic form and a ready-to-paste chmod command.

rwx = 4 + 2 + 1 = 7
rw- = 4 + 2     = 6
r-x = 4     + 1 = 5
r-- = 4         = 4

chmod 754 file  →  owner rwx, group r-x, public r--

Common chmod values

644  rw-r--r--  regular files: web pages, images, most config files
755  rwxr-xr-x  directories, scripts and programs others may run
600  rw-------  private files: SSH private keys, .env files
700  rwx------  private directories, such as ~/.ssh
777  rwxrwxrwx  anyone can change or replace it: avoid

On a directory, execute means permission to enter it and reach the files inside, which is why directories are usually 755 or 700 rather than 644. SSH refuses to use a private key that other users can read, so keys need 600.

Setuid, setgid and the sticky bit

  • A fourth digit in front sets the special bits: setuid is 4, setgid is 2 and the sticky bit is 1. The calculator adds it when you tick them.
  • Setuid (4755): the program runs with its owner's permissions. passwd uses it to update a file only root can write. Avoid it on your own scripts.
  • Setgid (2775): on a directory, new files take the directory's group, which helps shared project folders.
  • Sticky bit (1777): in a shared directory such as /tmp, people can delete only their own files.

Octal or symbolic?

This calculator writes the octal form, which sets every permission at once. chmod also accepts symbolic changes that adjust one thing and leave the rest alone: chmod u+x deploy.sh makes a script executable for its owner, chmod g-w file removes group write, and chmod -R 755 dir applies a value to a folder and everything in it.

Frequently asked questions

What does chmod 755 mean?+

Owner can read, write and execute (7); group and everyone else can read and execute (5). It's the usual value for directories and scripts.

What does chmod 644 mean?+

Owner can read and write (6); group and everyone else can only read (4). It's the usual value for regular files.

Is chmod 777 safe?+

Rarely. It lets every user on the system change or replace the file. Use 755 for directories and 644 for files, and fix ownership with chown if a program can't write where it needs to.

What permissions should an SSH private key have?+

600, so only you can read and write it. SSH refuses to use a key that other users can read.

How do I make a file executable?+

Run chmod u+x file to add execute for the owner, or chmod 755 file to set the full permissions at once.