🌐 Linux Free Masterclass (Episode 12): Linux Permissions (chmod Command)
🌐 Linux Free Masterclass (Episode 12): Linux Permissions (chmod Command) How do Linux systems strictly control who can read, modify, or execute files and directories? Through the chmod (Change Mode) command. Here are t
🌐 Linux Free Masterclass (Episode 12): Linux Permissions (chmod Command)
How do Linux systems strictly control who can read, modify, or execute files and directories? Through the chmod (Change Mode) command.
Here are the key points from Episode 12:
🔹 1. Understanding Permissions (Read, Write, Execute)
The Three Permissions:
R (Read = 4): Permission to view or open a file.
W (Write = 2): Permission to modify, edit, or delete a file.
X (Execute = 1): Permission to run scripts or compiled programs.
The Three Categories: These rights apply separately to Owner (the creator), Group (associated team members), and Others (everyone else).
🔹 2. The chmod Command & Numeric (Octal) Mode
Octal Notation: Summing the values (Read=4, Write=2, Execute=1) creates permission sets. For example, 7 gives full read, write, and execute permissions (4+2+1).
Usage: Typing chmod 744 script.sh assigns full privileges to the owner (7), and read-only access to the group (4) and others (4).
🔹 3. Symbolic Mode (+ and - operations)
An alternative to remembering numbers, allowing you to modify permissions on the fly using symbols.
Usage:
chmod +x script.sh adds execute permission for everyone.
chmod u-w filename.txt removes write permission (-w) specifically for the user/owner (u).
🚀 Think of file permissions like access badges in a secure building: the owner is the department head with full keys, the group members have restricted office access, and outsiders have limited or zero entry rights!
Linux #Permissions #Chmod #SysAdmin #CyberSecurity #TechLearning #OpenSource
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.