chmod

Numeric Chmod

--- 0 --x 1 -w- 2 -wx 3 r-- 4 Read only r-x 5 Read/Execute rw- 6 Read/Write rwx 7 Total control

Common file chmod

-r-------- 400 Owner read only (/root/key_file.txt) -rw-r--r-- 600 Owner rw (/root/passwords.txt) -rw-r--r-- 644 Owner rw, others r (/var/log/some_log.txt) -rwxr-xr-x 755 Owner rwx, others rx (/some/shell_script.sh)

Directory Permissions

read Allowed to list the contents of the directory write Allowed to create, modify or delete files in the directory execute Allowed to access a file in the directory if you know the name of the file

Common directory chmod

drwx------ 700 Owner rwx (/root/.ssh/) drwxr-xr-x 755 Owner rwx, others rx (/opt/jgs/)

[Edit]