How do I calculate Unix file permissions (chmod)?
Toggle read, write, and execute checkboxes for owner, group, and others to instantly see the numeric (e.g., 755) and symbolic (e.g., rwxr-xr-x) permission values. You can also enter a numeric value to see which permissions it represents. Everything runs in your browser.
Owner: read, write Group: read Others: read
chmod 644 file.txt -rw-r--r--
Chmod Calculator
Calculate Unix file permissions. Toggle checkboxes or enter an octal code — results update instantly.
| Role | Read | Write | Execute | Value |
|---|---|---|---|---|
| Owner | 6 | |||
| Group | 4 | |||
| Others | 4 |
Common Presets
About Unix File Permissions
- Each digit represents permissions for owner, group, and others.
- Read (
4) + Write (2) + Execute (1) = octal digit. - Example:
755= owner rwx, group rx, others rx. - Everything runs in your browser — no data is sent over the network.
Tips & Best Practices
Use symbolic mode for readable, composable permissions
chmod u+rwx,g+rx,o+r is clearer than chmod 754. Symbolic mode lets you add or remove specific permissions without recalculating the full octal number. Use + to add, - to remove, = to set exactly. Symbolic mode is especially useful in scripts where intent matters more than brevity.
777 permissions are a security red flag
chmod 777 grants read, write, and execute to everyone — including other users on the server. This is the most common misconfiguration in web deployments. For web files: 644 for files (owner read/write, others read), 755 for directories (owner full, others read/execute). Never use 777 in production.
The sticky bit prevents file deletion in shared directories
Setting chmod 1777 on /tmp means any user can create files, but only the file owner can delete them. Without the sticky bit (just 777), any user can delete any other user's files. The sticky bit is the '1' prefix in octal notation or 't' in ls -l output (drwxrwxrwt).
SUID/SGID bits can be dangerous on executables
chmod 4755 (SUID) makes an executable run as the file owner, not the user who invoked it. This is how /usr/bin/passwd can write to /etc/shadow. Misconfigured SUID binaries are a top privilege escalation vector. Audit SUID files regularly: find / -perm -4000 -type f.
Frequently Asked Questions
How do Unix file permissions work?
What does chmod 755 mean?
What is the difference between chmod 644 and chmod 755?
Related Inspect Tools
Kubernetes YAML Validator
Validate Kubernetes manifests for syntax, required fields, best practices, security, and resource limits
OpenAPI / Swagger Validator
Validate OpenAPI 3.x and Swagger 2.0 specs for structure, paths, schemas, security, and best practices
.env File Validator
Validate .env files for syntax errors, duplicate keys, security risks, and best practices — export .env.example templates
File Hash Calculator
Compute MD5, SHA-1, SHA-256, SHA-384, SHA-512 file hashes — drag and drop to verify integrity with checksum comparison