Chmod Calculator
Interactive chmod permission calculator. Convert between numeric and symbolic Unix file permissions instantly.
Advertisement
Permission Mode
Common Presets
Standard directory / executable
Permission Matrix
| Role | Read (r) | Write (w) | Execute (x) | Octal |
|---|---|---|---|---|
| Owner | 7 | |||
| Group | 5 | |||
| Other | 5 |
Owner: read, write, execute
Group: read, execute
Other: read, execute
Command Preview
$ chmod 755 filenameQuick Reference
Permission Values
4 = Read (r)
2 = Write (w)
1 = Execute (x)
0 = None (-)
Combined Values
7 = rwx (full)
6 = rw- (read/write)
5 = r-x (read/execute)
4 = r-- (read only)
Digit Position
1st = Special
2nd = Owner
3rd = Group
4th = Other
Advertisement
How to Use the Chmod Calculator
The chmod calculator is a free interactive tool that helps you understand and set Unix/Linux file permissions. Whether you're a seasoned system administrator or learning Linux for the first time, this tool makes it easy to convert between the numeric (octal) format like 755 and the symbolic representation like rwxr-xr-x.
To use the calculator, simply click the checkboxes in the permission grid to toggle individual permissions for the owner, group, and other categories. Each row represents a user category, and each column represents a permission type: read (r), write (w), or execute (x). As you toggle checkboxes, the numeric and symbolic values update instantly. You can also type an octal number directly into the numeric input field, and the checkboxes will update to match.
The numeric format uses three digits (or four with special permissions), where each digit is the sum of its permission values: 4 for read, 2 for write, and 1 for execute. For example, 7 (4+2+1) grants all permissions, while 5 (4+1) grants read and execute. The first digit represents the owner, the second the group, and the third all other users.
The symbolic format displays permissions as a 9-character string like rwxr-xr-x. The first three characters show owner permissions, the next three show group permissions, and the final three show other permissions. A letter means the permission is granted, while a dash means it is not.
For advanced use cases, expand the Special Permissions section to configure SUID, SGID, and the sticky bit. These add a fourth leading digit to the octal notation. SUID (4) makes executables run as the file owner, SGID (2) makes executables run as the group or causes new files to inherit a directory's group, and the sticky bit (1) prevents users from deleting files they do not own in shared directories.
Use the Common Presets buttons to quickly select standard permission configurations. The Command Preview section generates a ready-to-use chmod command that you can copy and paste directly into your terminal. Enter your filename or path in the filename field to customize the command. All calculations happen entirely in your browser, so no data is ever sent to any server.
Frequently Asked Questions
What is chmod and how does it work?
chmod (change mode) is a Unix/Linux command that changes the access permissions of files and directories. It controls who can read, write, or execute a file. Permissions are assigned to three categories: the file owner, the group, and all other users. You can set permissions using either numeric (octal) notation like 755 or symbolic notation like rwxr-xr-x.
How do numeric (octal) chmod permissions work?
Numeric chmod permissions use a three or four-digit octal number. Each digit represents permissions for owner, group, and other respectively. The digit is calculated by adding: 4 for read, 2 for write, and 1 for execute. For example, 7 (4+2+1) means full access, 5 (4+1) means read and execute, and 0 means no permissions. So 755 gives the owner full access and everyone else read/execute access.
What is the difference between chmod 755 and chmod 644?
chmod 755 (rwxr-xr-x) gives the owner full read, write, and execute permissions, while group and others get read and execute only. This is commonly used for directories and executable scripts. chmod 644 (rw-r--r--) gives the owner read and write permissions, while group and others can only read. This is the standard permission for regular files like HTML pages, images, and configuration files.
What are SUID, SGID, and the sticky bit?
These are special permission bits represented by the optional fourth (leading) octal digit. SUID (Set User ID, value 4) makes an executable run with the file owner's permissions. SGID (Set Group ID, value 2) makes an executable run with the group's permissions, or makes new files in a directory inherit the directory's group. The sticky bit (value 1) on a directory prevents users from deleting files they don't own, commonly used on /tmp.
What is the difference between symbolic and numeric chmod notation?
Numeric notation uses octal numbers (e.g., chmod 755) where each digit represents the combined permissions for a role. Symbolic notation uses letters (e.g., chmod u=rwx,g=rx,o=rx) where u=owner, g=group, o=others, and r=read, w=write, x=execute. Symbolic notation also supports relative changes with + and - (e.g., chmod g+w adds group write). Numeric is more concise, while symbolic is more readable and allows incremental changes.
Why should I avoid using chmod 777?
chmod 777 gives everyone full read, write, and execute permissions, which is a serious security risk. Any user on the system can modify or delete your files, and executable files can be altered to run malicious code. Instead, use the minimum permissions needed: 755 for directories and executables, 644 for regular files. Only the file owner should typically have write permission.