Chmod calculator

Set permissions with checkboxes, or type an octal or symbolic mode. You get the chmod command, the ls -l view and a plain-English explanation.

Private: works in your browser, nothing is uploaded.

How to use the Chmod Calculator tool

  1. Tick the permissions, or type a mode like 644 or rwxr-x---.
  2. Add setuid, setgid or the sticky bit if needed.
  3. Copy the chmod command.

How Unix permissions work

Every file and directory has three sets of permissions: for the owner, the group and others. Each set has read (4), write (2) and execute (1). Add the numbers to get one digit per set: read and write is 6, read and execute is 5, all three is 7. So 754 means owner rwx, group r-x, others r--.

On directories the meaning shifts: read lists the names, write creates and deletes files inside, and execute lets you enter the directory and reach files in it. A directory without execute is effectively closed, even if it is readable.

Sensible defaults

  • 644: regular files (web pages, configs). Owner edits, everyone reads.
  • 755: directories and scripts.
  • 600: private keys and files with passwords, such as ~/.ssh/id_ed25519 or .env.
  • 700: private directories like ~/.ssh.
  • 775 / 664: shared project folders where a group collaborates.
  • 1777: shared temp directories like /tmp: anyone writes, only the owner deletes.

From server administration: if someone suggests chmod 777 to “fix” an error, find the real cause instead. It is almost always the wrong owner (fix with chown) or a missing group, and 777 lets any process on the server change the file.

Special bits

setuid (4xxx) runs a program with its owner’s rights, as passwd does. setgid (2xxx) on a directory makes new files inherit its group, which is perfect for shared folders. The sticky bit (1xxx) on a directory allows only owners to delete their files. Capital S or T in ls -l means the special bit is set but execute is not.

Privacy

Everything runs in your browser. Nothing you type is sent to our server or stored.

Octal digits explained

DigitPermissionsMeaning
0---no access
1--xexecute only
2-w-write only
3-wxwrite and execute
4r--read only
5r-xread and execute
6rw-read and write
7rwxread, write and execute

Each mode has three digits: owner, group and others. 640 means owner read and write (6), group read (4), others nothing (0).

Checking permissions

Run ls -l to see permissions, owner and group of files, and stat -c "%a %n" file on Linux to see the octal mode. Wrong ownership is as common as wrong modes: chown user:group file changes the owner, and web server problems often come from files owned by root.

Frequently asked questions

What does chmod 755 mean?

Owner can read, write and execute; group and others can read and execute.

What permissions should a WordPress site have?

Typically 755 for directories, 644 for files and 600 or 640 for wp-config.php, with files owned by the web server user or a deploy user.

How do I apply permissions recursively?

chmod -R applies the same mode to everything. To treat files and directories differently use find: find . -type d -exec chmod 755 {} + and find . -type f -exec chmod 644 {} +.

Why does SSH refuse my key?

SSH rejects private keys that others can read. Set chmod 600 on the key and 700 on ~/.ssh.

What does chmod 777 do?

It gives read, write and execute to everyone on the system. It hides permission problems instead of fixing them and is a security risk; set the correct owner or group instead.

Is chmod 777 ever a good idea?

Almost never. It lets every user on the system change the file. Fix ownership or group membership instead.

Is anything sent to a server?

No. The calculator runs in your browser.

What is the difference between chmod 755 and 644?

755 lets everyone read and execute, and only the owner write; it is used for directories and scripts. 644 lets everyone read and only the owner write; it is used for normal files.