Tick read, write and execute for owner, group and others and get the octal number (like 755), the symbolic form (-rwxr-xr-x) and a ready-to-run chmod command. You can also type an octal value to see which permissions it grants.
chmod 755 script.sh, and run it in your terminal.Each permission has a value: read = 4, write = 2, execute = 1. Add them for each of the three groups (owner, group, others) to get one digit, giving a three-digit number.
| Digit | Permissions | Symbolic |
|---|---|---|
| 7 | read + write + execute (4+2+1) | rwx |
| 6 | read + write (4+2) | rw- |
| 5 | read + execute (4+1) | r-x |
| 4 | read only | r-- |
| 2 | write only | -w- |
| 1 | execute only | --x |
| 0 | no access | --- |
| Mode | Meaning | Use for |
|---|---|---|
644 | Owner read/write; everyone else read-only | Regular files, HTML, config |
755 | Owner full access; everyone else read and execute | Scripts, programs, directories |
600 | Owner read/write only | Private files, SSH keys |
700 | Owner full access only | Private directories |
400 | Owner read-only | Files that must not change, key files |
777 | Everyone can read, write and execute | Avoid: a security risk |
In a listing like -rwxr-xr--, the first character is the file type (- for a file, d for a directory), followed by the owner, group and others permissions in three-letter groups. This one is 754: owner rwx (7), group r-x (5), others r-- (4). The calculator shows this symbolic form for a regular file.
x (755, not 644).-R yourself: chmod -R 755 folder. The calculator produces the basic command.777. If something “only works” with 777, fix the owner or group instead.See how octal relates to binary with the number base converter, schedule scripts with the cron expression parser, or generate strong secrets with the password generator.
| Read | Write | Execute | Value | |
|---|---|---|---|---|
| Owner | 7 | |||
| Group | 5 | |||
| Others | 5 |
chmod 755 file.sh