juniorDevOps
Explain Linux File Permissions (chmod).
Updated Apr 28, 2026
Short answer
Linux permissions dictate who can Read (r), Write (w), and Execute (x) a file, divided into Owner, Group, and Others.
Deep explanation
Permissions are represented numerically (octal) or symbolically. Read=4, Write=2, Execute=1. The sum gives the permission for a category. chmod 755 means the Owner has 7 (4+2+1=read/write/execute), while Group and Others have 5 (4+1=read/execute).
Real-world example
Making a bash deployment script executable (chmod +x deploy.sh) so the CI runner can execute it.
Common mistakes
- Using `chmod 777` to fix permission denied errors, which creates a massive security vulnerability.
Follow-up questions
- What does the `root` user do?