← Knowledge Base
LinuxReference note1 min read · updated 2026-11-27

File permissions: chmod, chown and the numbers

How to read and change Unix permissions, what 644, 755 and 600 mean, and the sticky and setuid bits.

chmodchownpermissions

ls -l shows -rwxr-xr-- owner group: three triplets for the owner, the group and others; r = read (4), w = write (2), x = execute (1).

Number Meaning Typical use
644 owner read/write, others read normal files
755 owner all, others read/execute scripts, directories
600 owner read/write only private keys, secrets
700 owner only private directories
chmod 644 file
chmod u+x script.sh           # add execute for the owner
chmod -R a+rX /srv/site       # everyone may read; X adds execute only on directories
sudo chown alice:staff file
sudo chown -R www-data: /var/www

For directories, x means "may enter". A web server that answers 403 Forbidden often just cannot read or traverse a directory: check every parent directory. SSH refuses private keys that others can read: chmod 600 ~/.ssh/id_ed25519.