Linux permissions: 640, 755 and beyond
Linux permissions determine which users may read, write, or execute files.
Understand the numbers
Read = 4, write = 2, execute = 1. Permissions are grouped as owner, group and others.
chmod 640 notes.txtThe owner has read/write permissions, the group has read-only access, and everyone else has none.
chmod 755 script.shThe owner can read, write and execute. Group and others can read and execute.
Inspect permissions
ls -l notes.txt
stat notes.txt
idPractice on files in your home directory. Avoid using chmod 777 as a general fix.
← BACK TO JOURNAL
CYBER