File permissions are the backbone of Linux security. If you misunderstand this topic, you will break systems — or expose them.
Linux is a multi-user operating system. Not every user should be able to read, modify, or execute every file.
Permissions answer three questions:
ls -l
Example output:
-rw-r--r-- 1 user group file.txt
The permission string has three sections:
Each section contains:
r → readw → writex → execute
chmod controls what actions are allowed.
chmod u+x script.sh
Adds execute permission for the owner.
Linux also uses numbers:
Example:
chmod 755 script.sh
Meaning:
Ownership controls responsibility.
sudo chown user file.txt
Change owner and group:
sudo chown user:group file.txt
Permissions behave differently on directories.
r → list filesw → create/delete filesx → access directorychmod -R 755 myfolder
Applies permissions to all files and subfolders.
Never blindly use:
chmod -R 777 /
This destroys system security.
Permissions are not about convenience. They are about control, accountability, and safety.
In the next part, we will learn about users, groups, and sudo — who is allowed to do what in Linux.
Next: Users, Groups & sudo →