🔐

Chmod Calculator

Pick read/write/execute bits and get the octal mode plus the chmod command

Identity Read r (4) Write w (2) Execute x (1) Value
chmod 755 filename
Security reminder: 777 (writable by everyone) means anyone can replace the contents of this file, so don't set it this way in a production environment. A common practice for website directories is 644 for files and 755 for directories; only give x to scripts that actually need execute permission.

Instructions

chmod Permission Calculator Instructions\n\n## Overview\nLinux file permissions come in two forms: octal (755) and symbolic (rwxr-xr-x). This tool lets you convert between them by checking boxes, so you avoid mistakes that leave files unopenable or permissions too wide open.\n\n## How to Use\n1. In the table, check the read (r=4), write (w=2) and execute (x=1) permissions for owner, group and others\n2. The value for each group appears on the right in real time, and the three-digit octal, four-digit octal and symbolic forms are shown below\n3. You can also type 755 directly into the "octal" input box and the checkboxes will sync in reverse\n4. Click a common permission button to quickly apply 644 / 600 / 755 / 700 / 775 / 777\n5. The dark box at the bottom holds a copy-ready `chmod xxx filename` command\n\n## Notes\n- 777 means anyone can rewrite the file, so do not use it in production; the usual practice for website directories is 644 for files and 755 for directories\n- Give execute permission (x) only to scripts that actually need to run; plain text files and images do not need x\n- Each octal digit can only be 0-7; if you enter 8 or 9 the tool takes the value per digit and shows a hint\n- For directories, x means "you can enter this directory", which differs from the meaning of x on files

❓ FAQ

Where are 644 and 755 used?

644 is for regular files: the owner can read and write, others can only read. 755 is for directories and scripts that need to run: the owner can read, write and execute, others can read and execute.

Why can't 777 be used in production?

777 means anyone can modify the file. If a website directory is 777, an attacker only needs to find an upload entry point to replace it with their own script and run it, which is very risky.

What does x mean in directory permissions?

For a directory, x means "you can enter it and look up files inside it". If a directory has no x, you cannot access the files inside even if it has r permission.