๐ Why File Permissions Matter
Linux is a multi-user operating system. Without proper permissions:
-
Anyone could read sensitive files
-
System files could be modified or deleted
-
Applications may break
-
Security risks increase
Permissions ensure privacy, security, and stability.
๐ The Three Basic Permissions
Every file and directory has three types of permissions:
| Symbol | Meaning | What It Allows |
|---|---|---|
| r | Read | View file contents / list directory items |
| w | Write | Modify file / add or delete files inside a directory |
| x | Execute | Run file / enter or access a directory |
๐ฅ Permission Categories
Linux divides permissions into three groups:
-
Owner (u) → The creator/owner of the file
-
Group (g) → Users belonging to the same group
-
Others (o) → Everyone else on the system
A typical ls -l permission looks like:
Breakdown:
-
rw-→ Owner permissions -
r--→ Group permissions -
r--→ Others permissions
๐งฎ Numeric (Octal) Permission Mode
Linux also represents permissions using numbers:
-
r = 4
-
w = 2
-
x = 1
Example
Meaning:
| User | Value | Permission |
|---|---|---|
| Owner | 7 | rwx |
| Group | 5 | r-x |
| Others | 5 | r-x |
๐ง Essential File Permission Commands
| Command | Purpose | Example |
|---|---|---|
| chmod | Change permissions | chmod 644 notes.txt |
| chown | Change file owner/group | chown user:group file.txt |
| ls -l | View file permissions | ls -l /home/user |
Symbolic Mode Examples
๐ง Pro Tips
-
Use
chmod +x script.shto make a script executable -
Run
ls -loften to audit file permissions -
Avoid using
chmod 777— it exposes your system -
Assign groups properly to simplify access control
๐ What’s Next?
In Post #4, we’ll explore Linux process management, including:
-
ps -
top -
kill -
nice / renice
You’ll learn how to monitor and control running tasks like a pro.
FAQs (0)
Sign in to ask a question. You can read FAQs without logging in.