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.

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.