Skip to main content
junior
beginner
Linux

Linux File Permissions

Question

Explain Linux file permissions. What does the permission 'rwxr-xr--' mean?

Answer

Linux file permissions are divided into three groups: owner, group, and others. Each has read (r), write (w), and execute (x) permissions. 'rwxr-xr--' means: owner has full access (rwx), group can read and execute (r-x), others can only read (r--). Use chmod to modify permissions and chown to change ownership.

Why This Matters

File permissions are fundamental to Linux security. They control who can read, write, or execute files. Understanding permissions is essential for troubleshooting access issues, setting up secure deployments, and managing shared resources in team environments.

Code Examples

View and modify permissions

bash

Change ownership

bash
Common Mistakes
  • Setting chmod 777 on production files (security risk)
  • Forgetting that directories need execute permission for traversal
  • Not understanding the difference between numeric and symbolic notation
Follow-up Questions
Interviewers often ask these as follow-up questions
  • What is the difference between chmod 755 and chmod 777?
  • How do special permissions like setuid, setgid, and sticky bit work?
  • What is umask and how does it affect default file permissions?
Tags
linux
permissions
security
fundamentals
sysadmin