Common chmod Modes Explained
One page per permission mode: what each digit means for the owner, group and everyone else, the symbolic form you see in ls -l, where the mode is the right choice, the security risks, and the exact chmod and find commands to apply it safely.
Everyday files and directories
755rwxr-xr-xOwner full access, everyone else read and execute
The owner can read, write and execute; the group and all other users can read and execute, but not modify.
644rw-r--r--Owner read and write, everyone else read-only
The owner can read and write; the group and all other users can only read. Nobody can execute it.
775rwxrwxr-xOwner and group full access, others read and execute
The owner and members of the file's group can read, write and execute; all other users can read and execute but not modify.
664rw-rw-r--Owner and group read and write, others read-only
The owner and members of the file's group can read and write; all other users can only read. Nobody can execute it.
Private and group-only
700rwx------Owner full access, nobody else
The owner can read, write and execute or enter it; the group and other users have no access at all.
600rw-------Owner read and write only
The owner can read and write the file; the group and everyone else have no access.
750rwxr-x---Owner full access, group read and execute, others none
The owner can read, write and execute; group members can read and execute; all other users have no access.
640rw-r-----Owner read and write, group read, others none
The owner can read and write; group members can only read; all other users have no access.
711rwx--x--xOwner full access, others execute or traverse only
The owner has full access; the group and other users can only execute: run a binary, or pass through a directory to a path they already know.
Read-only
400r--------Owner read-only
The owner can only read the file; nobody else has any access, and even the owner cannot modify it without changing the mode first.
444r--r--r--Read-only for everyone
Everyone, including the owner, can read the file; nobody can write to it or execute it without first changing its mode.
World-writable (handle with care)
Special bits: setuid and sticky
4755rwsr-xr-xsetuid: runs as the file's owner
755 permissions plus setuid: anyone can run the program, and while it runs it has the privileges of the file's owner (usually root) instead of the caller's.
1777rwxrwxrwtSticky bit: world-writable, delete only your own files
Everyone can create files in the directory, but only a file's owner, the directory's owner or root can delete or rename it.
Reading any mode in ten seconds
Read is 4, write is 2 and execute is 1. Each digit is the sum for one class: owner, group, others. So 7 is rwx, 6 is rw-, 5 is r-x, 4 is r-- and 0 is ---. A fourth, leading digit adds the special bits: 4 for setuid, 2 for setgid and 1 for the sticky bit.
On a directory, read lets you list names, write lets you create and delete entries, and execute lets you enter it and reach files inside. That is why directories are usually 755 or 750 while files are 644 or 640.
Don't see your mode? Tick the boxes in the chmod calculator to convert any combination, or read Linux file permissions explained for chown, umask and ACLs.