File Permissions (chmod/chown)Intermediate
1Question 1 of 1
bashHow do Linux file permissions and chmod (numeric vs symbolic) work?
Explanation & Concept
Linux permissions are divided into three user classes: **User (u)**, **Group (g)**, and **Others (o)**. Each class has three permission bits: • Read (r = 4) • Write (w = 2) • Execute (x = 1)
Numeric permissions sum these values (e.g., `755` = rwx for user, r-x for group, r-x for others).
Code Example
bash
# Give read, write, execute to owner; read and execute to group and others
chmod 755 deploy_script.sh
# Make script executable symbolically
chmod +x deploy_script.sh
# Change file ownership to user 'appuser' and group 'webgroup'
chown appuser:webgroup deploy_script.shHow It Works & Key Takeaways
`chmod 600 id_rsa` ensures only the current user can read their private SSH keys, which OpenSSH strictly enforces before allowing connections.
Mock Test · 1 Questions · Optional
Ready for Disk & Storage Management?
Take a quick test to evaluate yourself, or move straight to the next module.
Advanced3 questions