Chmod Permissions Calculator
Calculate Linux file permissions visually with octal, symbolic notation, checkboxes, and command generator.
Permission Mode & Presets
Interactive Permissions Grid
Check or uncheck boxes to adjust permissions| Permission | Owner (User) | Group | Public (Others) |
|---|---|---|---|
Read (4) |
|||
Write (2) |
|||
Execute (1) |
|||
| Special Bits |
Generated Linux Chmod Commands
Click any command to copy| Standard octal: | chmod 755 filename |
|---|---|
| Recursive (-R): | chmod -R 755 /path/to/folder |
| Symbolic syntax: | chmod u=rwx,g=rx,o=rx filename |
| Separate files & dirs: |
find . -type f -exec chmod 644 {} +
find . -type d -exec chmod 755 {} +
|
How to use the Chmod Calculator
- Check or uncheck the Read, Write, and Execute boxes for Owner, Group, and Others, or type an octal mode like 755 or 644.
- Optionally toggle special bits (SetUID, SetGID, Sticky Bit) for directories or system binaries.
- Review the generated symbolic notation (e.g. -rwxr-xr-x) and permission explanation.
- Copy the ready-to-run chmod command in octal or symbolic syntax, or with the recursive -R flag.
Understanding Linux file permissions and chmod
In Unix and Linux operating systems, file permissions dictate who can read, modify, or execute files and directories. Every file and directory is assigned to an Owner (User), a Group, and Others (everyone else). The chmod (change mode) command modifies these permissions using either octal notation (such as 755 or 644) or symbolic notation (such as u=rwx,go=rx).
How the octal calculation works
Each role's permission is represented by a single digit from 0 to 7, formed by adding the binary weights of the permissions granted:
- Read (
r) = 4 — permits opening and viewing file contents or listing directory entries. - Write (
w) = 2 — permits modifying or deleting file contents, or creating/removing files within a directory. - Execute (
x) = 1 — permits running a file as an executable binary or script, or traversing/entering a directory (cd).
For example, to grant Read (4), Write (2), and Execute (1) to the owner, the first digit is 4 + 2 + 1 = 7. To grant Read (4) and Execute (1) to group members and public visitors, their digits are 4 + 1 = 5. Combined, this yields the classic mode 755 (symbolic: -rwxr-xr-x).
What are SUID, SGID, and the Sticky Bit?
In addition to basic read, write, and execute permissions, Linux supports three special permission bits:
- SetUID (
4000) — when set on an executable binary, any user running the program executes it with the privileges of the file owner (commonly used by system utilities likepasswd). - SetGID (
2000) — on directories, newly created files automatically inherit the directory's group ownership rather than the primary group of the creating user. This is ideal for shared team folders. - Sticky Bit (
1000) — on directories like/tmp(often set to1777ordrwxrwxrwt), only the file's owner or the root user can delete or rename files, preventing users from deleting each other's temporary data.
Recommended security best practices
- Avoid
chmod 777— never set 777 on production servers or web directories. A 777 folder allows any local user or compromised background process to write malicious scripts or overwrite critical files. - Standard web application files: Set files to
644(rw-r--r--) and directories to755(rwxr-xr-x). This allows web servers (like Nginx, Apache, or PHP-FPM) to read files while ensuring only the owner can modify them. - SSH keys and credentials: Private SSH keys (such as
id_rsaor.pemfiles) must have restrictive permissions like600(rw-------). OpenSSH refuses to use private keys that are accessible to group or public users.
Frequently asked questions
What do the three numbers in a chmod mode mean?
What are common Linux file and folder permissions?
644 (rw-r--r--) is the standard for regular files (readable by all, writable only by owner). 755 (rwxr-xr-x) is standard for directories and executable scripts. 600 (rw-------) is recommended for sensitive files like SSH private keys.What are SUID, SGID, and the Sticky Bit?
/tmp (1777), ensures only a file’s owner or root can delete or rename it.What is the difference between octal and symbolic chmod syntax?
chmod 755 file) sets the absolute permission mask all at once. Symbolic syntax (e.g. chmod u=rwx,go=rx file or chmod +x script.sh) modifies specific permission bits relative to current permissions.Why should I avoid using chmod 777?
777 gives read, write, and execute permissions to everyone on the system. Any local user, background process, or compromised web service can overwrite, delete, or execute malicious files in a 777 folder.Last updated . Launched with interactive permission grid, octal and symbolic sync, SUID/SGID/sticky bit support, and CLI command generator.
Building something that needs live data?
ProWebLook APIs validate phone numbers, check WhatsApp accounts, verify emails and geolocate IPs. Try every endpoint in the browser, then grab a free API key.