Linux Permissions Cheatsheet

Complete chmod, chown, chgrp, and permission notation reference with examples

The Linux permissions cheatsheet covers chmod symbolic and octal notation, chown and chgrp for ownership changes, special permissions (SUID, SGID, sticky bit), and umask defaults. Use the search to find specific commands and copy them with one click.

Octal Permission Reference

Octal

Symbolic

Meaning

Permission Syntax: chmod [owner][group][other] file

Three-digit octal: each digit is the sum of r=4, w=2, x=1 for that category.

How to Use Linux File Permissions

Linux permissions control who can read, write, and execute files. The Linux permissions cheatsheet provides fast access to the most common chmod, chown, and chgrp patterns.

Step 1: Understand the three-part permission string

The output of ls -la shows permissions like -rwxr-xr-x. The first character is the file type (- for regular, d for directory, l for symlink). The next nine characters are three sets of rwx (read/write/execute) for owner, group, and others.

Step 2: Use octal notation for reliable chmod

Octal notation is unambiguous: each digit is the sum of r=4, w=2, x=1. Common patterns: chmod 755 for executables and directories (rwxr-xr-x), chmod 644 for regular files (rw-r--r--), chmod 600 for private keys (rw-------).

Step 3: Use symbolic notation for targeted changes

Symbolic notation adds or removes permissions without affecting others: chmod +x script.sh adds execute for all, chmod o-w file removes write from others, chmod g+r file adds read for group.

Step 4: Recursive permission changes

Use chmod -R 755 /var/www/ to recursively set permissions on a directory tree. Be careful with recursive changes — applying 755 to all files makes them executable, which is usually wrong for regular files. A better pattern: set directories to 755 and files to 644 using find: find /path -type d -exec chmod 755 {} \; && find /path -type f -exec chmod 644 {} \;

Frequently Asked Questions

Is this Linux permissions cheatsheet free?

Yes, completely free with no signup. All commands and examples are copyable.

What does chmod 755 mean?

chmod 755 sets permissions to rwxr-xr-x: owner has read/write/execute (7=111), group has read/execute (5=101), others have read/execute (5=101). Commonly used for web server files and directories that need to be readable and executable by others but only writable by the owner.

What is the difference between chmod 644 and 755?

chmod 644 (rw-r--r--) is for regular files: owner can read and write, group and others can only read. chmod 755 (rwxr-xr-x) adds execute permission for the owner and read/execute for group/others — used for directories and executables.

What does the sticky bit do?

The sticky bit (chmod +t or chmod 1xxx) on a directory means only the file owner, directory owner, or root can delete files in that directory, even if others have write permission. Commonly used on /tmp to prevent users from deleting each other's files.

Is my data safe when using this tool?

Yes. This cheatsheet runs entirely in your browser. No data is sent to any server.