PureTools

chmod Permissions: 755, 644, and What the Numbers Mean

PureTools Team· 5 min read
chmod Permissions: 755, 644, and What the Numbers Mean

chmod: What Those Three Numbers Mean

When you see chmod 755 script.sh, each digit represents permissions for a different group: owner, group, and others. Each digit is a sum of permission values.

The Permission Values

ValuePermissionSymbol
4Readr
2Writew
1Executex
0None-

Add them together: 7 = 4+2+1 = rwx, 5 = 4+0+1 = r-x, 6 = 4+2+0 = rw-.

Reading chmod 755

chmod 755 script.sh
       │││
       ││└── Others: 5 (r-x) — can read and execute
       │└─── Group:  5 (r-x) — can read and execute
       └──── Owner:  7 (rwx) — can read, write, and execute

# In ls -l output:
-rwxr-xr-x  1 user group  1234 Apr 25 script.sh
 │││││││││
 ││││││││└── Others: execute
 │││││││└─── Others: no write
 ││││││└──── Others: read
 │││││└───── Group: execute
 ││││└────── Group: no write
 │││└─────── Group: read
 ││└──────── Owner: execute
 │└───────── Owner: write
 └────────── Owner: read

Common Permission Sets

chmodSymbolUse Case
755rwxr-xr-xExecutable scripts, directories
644rw-r--r--Regular files (HTML, CSS, images)
600rw-------Private files (.env, SSH keys)
700rwx------Private directories, scripts
777rwxrwxrwxNEVER use in production (everyone can do everything)
444r--r--r--Read-only for everyone

Symbolic Mode

# Add execute for owner
chmod u+x script.sh

# Remove write for group and others
chmod go-w file.txt

# Set exact permissions
chmod u=rwx,g=rx,o=rx script.sh  # same as 755

# u=user(owner), g=group, o=others, a=all

Calculate permissions: chmod Calculator — click checkboxes, get the numeric and symbolic chmod value.

chmod Permissions: 755, 644, and What the Numbers Mean — PureTools — PureTools