DEV Community

Cover image for Linux File Permissions: Complete Guide & Cheat Sheet (2026)
Dargslan
Dargslan

Posted on • Originally published at dargslan.com

Linux File Permissions: Complete Guide & Cheat Sheet (2026)

Linux file permissions are one of the most fundamental concepts every developer, system administrator, and DevOps engineer must understand.

They control who can read, write, and execute files — directly impacting system security, application behavior, and troubleshooting workflows.

To make this easier to learn and use in real environments, I created the Linux File Permissions Complete Cheat Sheet 2026, a practical reference covering both basics and advanced concepts.

👉 Read the full guide and download the cheat sheet


Why File Permissions Matter

Permissions are the first line of defense in Linux systems. They determine who can access files, modify data, and execute programs.

Incorrect permissions can lead to:

  • security vulnerabilities
  • unauthorized access
  • application failures
  • unexpected behavior

Understanding permissions is essential for maintaining secure and stable systems.


The rwx Permission Model

Linux permissions are based on three basic access types:

  • r (read) – view file contents
  • w (write) – modify file contents
  • x (execute) – run a file as a program

These permissions are applied to three categories:

  • user (owner)
  • group
  • others

Example:


-rwxr-xr--

This means:

  • owner: read, write, execute
  • group: read, execute
  • others: read only

Octal vs Symbolic Notation

Permissions can be represented in two formats.

Octal Notation

Each permission is assigned a value:

  • r = 4
  • w = 2
  • x = 1

Example:


chmod 755 file.sh

This means:

  • owner: 7 (rwx)
  • group: 5 (r-x)
  • others: 5 (r-x)

Symbolic Notation


chmod u+x file.sh

This adds execute permission for the user.


Core Commands

Linux provides simple tools to manage permissions and ownership.

chmod


chmod 644 file.txt

Change file permissions.

chown


chown user:group file.txt

Change file owner and group.

chgrp


chgrp developers file.txt

Change group ownership.


Special Permissions

Linux includes advanced permission bits for specific scenarios.

  • SUID – execute file as file owner
  • SGID – inherit group ownership
  • Sticky Bit – restrict deletion in shared directories

Example:


chmod 4755 file

This sets the SUID bit.


Default Permissions and umask

When new files are created, default permissions are applied.

The umask value determines which permissions are removed.


umask

Example:


umask 022

This results in:

  • files: 644
  • directories: 755

Access Control Lists (ACLs)

ACLs allow more fine-grained permission control beyond the standard model.

Example:


setfacl -m u:john:r file.txt

This gives user "john" read access.


SELinux and AppArmor

Modern Linux systems often include additional security layers.

  • SELinux – label-based security enforcement
  • AppArmor – profile-based restrictions

These systems can override traditional permissions and add another level of protection.


Directory Permissions Explained

Permissions behave differently on directories:

  • r – list files
  • w – create/delete files
  • x – access directory (cd)

Without execute permission, you cannot enter a directory even if you can read it.


Finding Files by Permission

You can locate files with specific permissions using:


find / -perm 777

This is useful for identifying insecure configurations.


Common Permission Issues

Typical problems include:

  • permission denied errors
  • incorrect ownership
  • missing execute permissions
  • misconfigured umask
  • conflicts with SELinux/AppArmor

Understanding how permissions work helps resolve these issues quickly.


Security Best Practices

  • avoid using 777 permissions
  • follow least privilege principles
  • review permissions regularly
  • use groups instead of broad access
  • monitor sensitive files

Why This Matters in 2026

As systems become more distributed and cloud-native, permission management remains a critical part of security.

From containers to cloud servers, controlling access correctly is essential for protecting systems and data.


Final Thoughts

Linux file permissions may seem simple at first, but they are one of the most powerful tools for managing system security and access.

Mastering them gives you better control over your environment, improves troubleshooting skills, and helps prevent critical security issues.

👉 Download the full cheat sheet here


Discussion

What is the most common permission issue you encounter in Linux?


#linux #devops #security #sysadmin #cloud

Top comments (0)