Using chmod for Standard
Permissions
In Linux, you can give permissions using chmod in two ways:
1. Symbolic (letter-based) method
2. Numeric (octal) method
1️⃣ Symbolic Method (u, g, o, a)
🔹 Who the permission applies to
u → user (owner)
g → group
o → others
a → all (u+g+o)
🔹 Permission symbols
r → read
w → write
x → execute
🔹 Operators
+ → add permission
→ remove permission
= → assign exact permission
📌 Examples
Using chmod for Standard Permissions 1
chmod u+r [Link]# Add read permission to owner
chmod g+w [Link]# Add write permission to group
chmod o-x [Link]# Remove execute permission from others
chmod a+r [Link]# Add read permission to everyone
chmod u=rwx [Link]# Set exact permissions for owner
chmod ug+rw [Link]# Add read & write to user and group
2️⃣ Numeric (Octal) Method
🔹 Permission values
Permission Value
Read (r) 4
Write (w) 2
Execute (x) 1
🔹 Common combinations
Number Permission
7 rwx (4+2+1)
6 rw- (4+2)
5 r-x (4+1)
4 r--
3 -wx
2 -w-
1 --x
0 ---
🔹 Order of numbers
Using chmod for Standard Permissions 2
OWNER GROUP OTHERS
📌 Examples
chmod 777 [Link]# rwx rwx rwx (full permissions)
chmod 755 [Link]# rwx r-x r-x
chmod 644 [Link]# rw- r-- r--
chmod 600 [Link]# rw- --- ---
chmod 700 [Link]# rwx --- ---
🔍 Check permissions
ls -l [Link]
Output example:
-rw-r--r-- 1 user group 1024 [Link]
Using chmod for Standard Permissions 3