📡 You're offline — showing cached content
New version available!
Quick Access

Linux Permissions: chmod, chown, and ACLs

Learn file permissions — read/write/execute, chmod, chown, and groups.

EzyCoders Admin April 17, 2026 2 min read 16 views
Linux Permissions: chmod, chown, and ACLs
Share: Twitter LinkedIn WhatsApp

What is it?

Linux uses a permission system with three levels (user, group, other) and three permissions (read=4, write=2, execute=1).

Why does it matter?

Permission errors are among the most common Linux problems. Understanding chmod lets you fix them confidently.

Learn file permissions — read/write/execute, chmod, chown, and groups.

Real-World Use Cases

  • 💡 Real-world use - Practical application.
  • Performance - Critical skill.
  • 🏢 Professional - Industry standard.
  • 📚 Learning - Career essential.

Core Concept

Linux permissions control who can read, write, or execute files and directories.

Permission Types

  • r (read) → view file / list directory

  • w (write) → modify file / add-remove files in directory

  • x (execute) → run file / access directory

 

-rwxr-xr--
│ │ │ │ │ │
│ │ │ │ │ └── others
│ │ │ └──── group
│ └──────── owner
└────────── file type
chmod 755 file
chown user:group file
chgrp group file
setfacl -m u:user:rwx file
getfacl file

Quick Cheat Sheet

Command Purpose
chmod 755 file set permissions
chown user:group file change owner
chgrp group file change group
setfacl -m u:user:rwx file add ACL
getfacl file view ACL

Example

# create file
touch app.sh

# give execute permission
chmod 755 app.sh

# change owner
chown ubuntu:ubuntu app.sh

# give extra access to user
setfacl -m u:john:rw app.sh

Best Practice

  • Use 644 for files, 755 for directories
  • Avoid 777 (security risk)
  • Use groups instead of giving access to everyone
  • Prefer ACLs for multi-user environments
  • Regularly audit permissions:

Q: What does chmod 755 mean?

Owner=rwx(7), group=r-x(5), others=r-x(5). Owner can read/write/execute; group and others can read and execute.

EzyCoders Admin
Written by
EzyCoders Admin

Team Lead and Full-Stack Developer with experience in PHP, JavaScript, SQL, DSA, and System Design. Passionate about software engineering, scalable web technologies, and helping developers prepare for coding interviews and tech careers through practical tutorials and professional guidance.

Comments (0)

No comments yet. Be the first!

Leave a Comment