Overview
Calculate Unix file permissions and chmod values
On Unix and Linux systems, every file and directory carries a set of permissions that decide who can read it, write to it, or run it. Those permissions split across three groups: the owner of the file, the group it belongs to, and everyone else. The chmod command changes them, and it accepts permissions either as a three digit octal number like 755 or as a symbolic string likerwxr-xr-x.
ToolHub chmod Calculator lets you toggle the read, write, and execute boxes for owner, group, and others, then reads off both the octal value and the symbolic string instantly. You can also type an octal number to set the boxes. It is pure logic running in your browser.
Step-by-step
How to use the chmod calculator
- 1
Check the permissions you want
Use the grid to grant read, write, or execute to the owner, group, and others. The octal and symbolic values update live. - 2
Or type an octal value
Already know the number? Type something like 644 into the octal field and the checkboxes snap to match. - 3
Copy the command
Set your filename, then copy the fullchmodcommand and paste it straight into your terminal.
Background
How permission numbers work
Each permission has a value: read is 4, write is 2, and execute is 1. You add them up for each group to get a single digit from 0 to 7. Read plus write plus execute is 4 plus 2 plus 1, which equals 7. Read plus execute is 4 plus 1, which equals 5. String the three digits together, one for owner, group, and others, and you have the octal value.
Reading the symbolic string
The symbolic form spells out the same thing with letters.rwxr-xr-x reads in three chunks of three: rwxfor the owner, r-x for the group, and r-x for others. A dash means that permission is off. This is exactly what you see in the first column of ls -l output.
Why 755 and 644 are everywhere
755 gives the owner full control and lets everyone else read and execute, which is the standard for directories and scripts.644 lets the owner read and write while others can only read, which suits ordinary files like documents and config. Knowing these two by heart covers most day to day needs.
Use cases
When you need chmod
Making a script executable
After writing a shell script you run chmod 755 script.sh so the system will actually run it.
Fixing web server permissions
Web files often need 644 and folders 755 so the server can read them without exposing write access.
Securing SSH keys
SSH refuses to use a private key unless it is locked down to 600, owner read and write only.
Sharing files with a group
Set the group bits so teammates in the same group can read or edit shared project files.
Locking down sensitive data
Use 600 or 700 to keep a file or folder private to the owner and invisible to everyone else.
Learning Unix permissions
Toggle boxes and watch the octal and symbolic values change to build an intuition for how chmod works.
Common permission values
- 755 (rwxr-xr-x): owner full, group and others read and execute. Standard for directories and scripts.
- 644 (rw-r--r--): owner read and write, others read only. Standard for regular files.
- 600 (rw-------): owner read and write, no access for anyone else. Used for private keys and secrets.
- 700 (rwx------): owner full control, nobody else. Used for private directories.
- 777 (rwxrwxrwx): everyone can do everything. Convenient but risky, avoid on anything public.
Common questions
What is the difference between octal and symbolic chmod?
They set the same permissions two ways. Octal uses numbers like755 and sets all three groups at once. Symbolic uses letters and operators like chmod u+x file to add or remove a single permission without touching the rest. This calculator shows the octal value you would use to set everything at once.
Why does my script say permission denied?
The execute bit is probably off. Run chmod +x yourscript.shor set the owner execute permission here to get an octal like755, then try again.
Is 777 ever a good idea?
Almost never. 777 lets any user on the system read, write, and execute the file, which is a serious security hole. If something only works at 777, the real problem is usually file ownership, not permissions.
What does the execute bit do on a folder?
On a directory, execute means the ability to enter it and access files inside by name. Without it you cannot cd into the folder even if you can read its listing, which is why folders usually need the execute bit set.
100% private