chmod Calculator: Understand Linux File Permissions in Seconds

chmod Calculator: Understand Linux File Permissions in Seconds cover art

What is chmod?

chmod stands for "change mode." It's the Unix/Linux command for setting file and directory permissions. Every file has three permission groups — owner, group, and others — and each group can have read (r), write (w), and execute (x) permissions.

Octal vs. symbolic notation

Permissions can be expressed two ways:

  • Symbolic: rwxr-xr-- (human-readable)
  • Octal: 754 (compact, used with the chmod command)

Each octal digit maps to 3 bits: read=4, write=2, execute=1. Add them together: rwx = 4+2+1 = 7, r-x = 4+0+1 = 5, r-- = 4+0+0 = 4 → 754.

Use the visual chmod Calculator

The chmod Calculator on HTMLToolz lets you toggle checkboxes for each permission bit and instantly see the octal value, symbolic string, and a ready-to-run chmod command.

  1. Open htmltoolz.com/tools/chmod-calculator
  2. Check or uncheck the Read / Write / Execute boxes for Owner, Group, and Others
  3. Copy the octal code or the full chmod 755 filename command

Common permission patterns

OctalSymbolicTypical use
755rwxr-xr-xExecutable scripts, directories
644rw-r--r--Web files (HTML, CSS, PHP)
600rw-------SSH keys, secret files
777rwxrwxrwxWorld-writable (avoid in production)
400r--------Read-only private key

Recursive chmod

To apply permissions to a directory and everything inside it, use the -R flag:

chmod -R 755 /var/www/html

Be careful with recursive chmod — setting execute on files that should not be executable (like PHP files) can be a security risk. The common pattern for web roots is to set directories to 755 and files to 644:

find /var/www/html -type d -exec chmod 755 {} \;
find /var/www/html -type f -exec chmod 644 {} \;