calculator chmod

Use this chmod calculator to create Linux file permissions in seconds. Toggle permissions using checkboxes, or paste an octal value like 755 or 2755 and apply it instantly.

Special Permission Bits

Owner / Group / Others

Class Read (4) Write (2) Execute (1)
Owner
Group
Others
Select permissions and click “Calculate CHMOD.”

What Is CHMOD?

chmod stands for “change mode” and is one of the most important Linux and Unix commands. It controls who can read, write, or execute a file or directory. If you have ever seen values like 644, 755, or 777, you were looking at chmod permission codes.

This calculator helps you translate between checkbox permissions, symbolic output like rwxr-xr-x, and octal values used in the terminal command chmod.

How Linux File Permissions Work

Permission Classes

  • Owner (u): The user who owns the file.
  • Group (g): Users who belong to the file’s group.
  • Others (o): Everyone else on the system.

Permission Types

  • Read (r = 4): View file contents or list directory contents.
  • Write (w = 2): Modify file contents or create/delete items in a directory.
  • Execute (x = 1): Run a file as a program or enter/traverse a directory.

Numeric (Octal) CHMOD Explained

Each class (owner, group, others) gets a number from 0 to 7, formed by adding read/write/execute values:

  • 7 = 4 + 2 + 1 = rwx
  • 6 = 4 + 2 = rw-
  • 5 = 4 + 1 = r-x
  • 4 = r--, 3 = -wx, 2 = -w-, 1 = --x, 0 = ---

So 755 means:

  • Owner: 7 = rwx
  • Group: 5 = r-x
  • Others: 5 = r-x

Special Bits: setuid, setgid, sticky

CHMOD can also include a leading digit for special permissions:

  • setuid (4): Executable runs with file owner privileges.
  • setgid (2): Executable runs with file group privileges; on directories, new files inherit group.
  • sticky (1): On shared directories, users can delete only files they own.

Example: 1777 is common for world-writable temp directories with sticky bit protection.

Common CHMOD Examples

  • chmod 644 file.txt — readable by everyone, writable by owner only.
  • chmod 600 id_rsa — private key readable/writable only by owner.
  • chmod 755 script.sh — executable script, not writable by group/others.
  • chmod 700 myfolder — private folder for owner only.
  • chmod 775 project — collaborative group write access.

Symbolic Mode vs Numeric Mode

You can set permissions with symbolic commands too:

chmod u+x deploy.sh
chmod g-w report.csv
chmod o-rwx secret.txt

Symbolic mode is great for incremental changes; numeric mode is best when you want a precise full permission state.

Security Best Practices

  • Avoid 777 unless you absolutely know why it is required.
  • Use least privilege: give only the permissions needed.
  • Protect credentials (600 for private keys, tokens, and config secrets).
  • Use group permissions for collaboration instead of making files world-writable.
  • Verify ownership with ls -l and chown before changing modes.

Troubleshooting “Permission Denied”

If chmod alone does not fix access issues, check:

  • Ownership: The file may belong to another user.
  • Parent directory permissions: You need execute permission to traverse directories.
  • Mount options: Some filesystems mount with noexec.
  • ACLs / SELinux / AppArmor: Extra security layers can override standard mode bits.

Final Takeaway

A reliable chmod calculator is a quick way to avoid mistakes and keep Linux systems secure. Use the interactive tool above to convert octal permissions, visualize symbolic output, and generate command-ready chmod values for scripts, files, and directories.

🔗 Related Calculators