Linux Tutorial — Part 7: File Permissions & Ownership

File permissions are the backbone of Linux security. If you misunderstand this topic, you will break systems — or expose them.

1. Why Linux Permissions Exist

Linux is a multi-user operating system. Not every user should be able to read, modify, or execute every file.

Permissions answer three questions:

2. Viewing Permissions

ls -l

Example output:

-rw-r--r-- 1 user group file.txt

3. Understanding Permission Symbols

The permission string has three sections:

Each section contains:

4. chmod — Changing Permissions

chmod controls what actions are allowed.

chmod u+x script.sh

Adds execute permission for the owner.

5. Numeric Permission System

Linux also uses numbers:

Example:

chmod 755 script.sh

Meaning:

6. chown — Changing Ownership

Ownership controls responsibility.

sudo chown user file.txt

Change owner and group:

sudo chown user:group file.txt

7. Directories vs Files

Permissions behave differently on directories.

8. Recursive Permission Changes

chmod -R 755 myfolder

Applies permissions to all files and subfolders.

⚠️ Critical Warning

Never blindly use:

chmod -R 777 /

This destroys system security.

Real-World Mindset

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 →
Disclaimer:
Incorrect permission changes can break systems. Always understand the impact before using sudo or chmod recursively.