File Permissions & ACLs
chmod, chown, umask, SUID/SGID/sticky bit, and POSIX ACLs for fine-grained access control.
Overview
Understanding permissions is non-negotiable for DevOps. Every SSH key must be 600. Every script needs +x. Every shared directory needs SGID. Get this wrong and you get 'Permission denied' with no obvious fix — or worse, a security hole.
Reading ls -l Output
Every ls -l line starts with 10 characters: drwxr-xr-x - Position 1: file type (-=file, d=directory, l=symlink, b=block device) - Positions 2-4: owner permissions (r/w/x) - Positions 5-7: group permissions (r/w/x) - Positions 8-10: others permissions (r/w/x)
Key concepts
- chmod octal vs symbolic
- umask
- SUID/SGID/sticky bit
- POSIX ACL (getfacl/setfacl)
Interview questions
- Explain the difference between octal permissions 755 and 700, and when you would use each.
- What is the SUID bit, where is it legitimately used, and what security risk does it pose?
Sign up free to read the full topic
More Linux topics
Start free on Cariara · Coding problems · System design studio