DD
DevDash

Last updated: April 12, 2026

chmod Permissions Cheatsheet

Quick Answer

chmod sets file permissions using octal numbers. Each digit represents owner/group/others. 4=read, 2=write, 1=execute. Common patterns: 755 for executables, 644 for files, 600 for secrets.

Common Patterns

CommandDescription
chmod 777 file

Everyone can read, write, and execute (dangerous!)

rwxrwxrwx
chmod 755 file

Owner: full access. Group/Others: read and execute

rwxr-xr-x — scripts, directories
chmod 750 file

Owner: full access. Group: read/execute. Others: none

rwxr-x--- — group-shared executables
chmod 700 file

Owner: full access. Group/Others: no access

rwx------ — private scripts
chmod 644 file

Owner: read/write. Group/Others: read only

rw-r--r-- — most regular files
chmod 640 file

Owner: read/write. Group: read. Others: none

rw-r----- — config files
chmod 600 file

Owner: read/write. Group/Others: no access

rw------- — SSH keys, secrets
chmod 400 file

Owner: read only. Group/Others: no access

r-------- — read-only secrets

Symbolic Mode

CommandDescription
chmod +x file

Add execute permission for all

chmod u+x file

Add execute permission for owner only

chmod g+w file

Add write permission for group

chmod o-r file

Remove read permission for others

chmod -R 755 dir/

Apply permissions recursively to directory

Number Reference

CommandDescription
4 = read (r)

Permission to read file contents or list directory

2 = write (w)

Permission to modify file or create/delete in directory

Frequently Asked Questions

More Cheatsheets

Want API access + no ads? Pro coming soon.