How to Use the chmod Calculator
Toggle the checkboxes in the permission grid to set read, write, and execute permissions for the owner, group, and others. The numeric and symbolic representations update instantly as you click. Alternatively, type a three-digit octal number directly into the numeric input field, and the checkboxes and symbolic display will sync automatically. The results panel on the right shows both formats along with the common name for well-known permission sets like 755 or 644.
Each row in the grid represents one of the three permission classes. The owner is the user who created the file. The group includes all users who belong to the file's assigned group. Others covers every user on the system who is not the owner and not in the group. Each class can independently hold read, write, and execute permissions in any combination.
Understanding Unix File Permissions
Unix-like operating systems use a three-level permission system to control file access. Every file and directory has an owner, a group, and a set of permissions for others. The chmod command modifies these permissions. In numeric mode, each permission class is represented by a single octal digit from 0 to 7. The digit is calculated by adding the values of the permissions you want to grant: 4 for read, 2 for write, and 1 for execute. A digit of 7 grants all three permissions, while 0 grants none.
Numeric vs. Symbolic Notation
Numeric notation uses three digits, one per class, making it compact and easy to type in scripts. Symbolic notation uses nine characters arranged as three groups of rwx, where a dash replaces any unset permission. For example, rw-r--r-- means the owner can read and write, while group and others can only read. Both notations represent the same underlying permission bits. Developers tend to prefer numeric notation for its brevity, while system administrators sometimes prefer symbolic notation for its clarity.
Common Permission Patterns
Permission 644 is the standard for regular files. It allows the owner to read and write while everyone else can only read. Permission 755 is standard for directories and executable files, adding execute access so users can enter directories or run scripts. Permission 600 restricts access entirely to the owner, making it appropriate for sensitive files like SSH private keys and application secrets. Permission 777 grants full access to everyone and should be avoided on production systems because it allows any user to modify or delete the file.
Security Considerations
Setting permissions too broadly is a common cause of security vulnerabilities on Linux servers. Web server files should generally be owned by the web server user with permissions set to 644 for files and 755 for directories. Configuration files containing database passwords, API keys, or encryption secrets should be set to 600 so only the application user can read them. If a directory needs to be writable by the web server, use 775 and add the web server user to the file's group rather than opening the directory to 777. Regularly audit permissions on sensitive paths using find / -perm -o+w -type f to locate world-writable files.
Frequently Asked Questions
What does chmod do in Unix and Linux?
The chmod command changes the access permissions of files and directories in Unix-like operating systems. Permissions control who can read, write, or execute a file. The command accepts either numeric notation like chmod 755 filename or symbolic notation like chmod u+rwx,g+rx,o+rx filename. Both forms achieve the same result.
What does 755 mean in chmod?
Permission 755 means the owner can read, write, and execute the file (7 = 4+2+1), while the group and others can only read and execute it (5 = 4+0+1). In symbolic form this is rwxr-xr-x. It is the standard permission for directories and executable files.
What is the difference between 644 and 755?
Permission 644 (rw-r--r--) allows the owner to read and write while everyone else can only read. Permission 755 (rwxr-xr-x) adds execute permission for all users. Use 644 for regular files and 755 for directories and scripts.
How do the three digits in chmod work?
Each digit represents the permissions for a different class: owner, group, and others. Each digit is the sum of its permission values: 4 for read, 2 for write, and 1 for execute. For example, 6 means read plus write (4+2), and 7 means all three (4+2+1).
What is the most secure file permission?
The most restrictive useful permission is 600 (rw-------), which allows only the owner to read and write the file. Use this for private SSH keys, password files, and database credentials. Never use 777 on a production server.
Save your results & get weekly tips
Get calculator tips, formula guides, and financial insights delivered weekly. Join 10,000+ readers.
No spam. Unsubscribe anytime.