Skip to main content

Menu

LEVEL 0
0/5 XP
HomeAboutTopicsPricingMy VaultStats

Categories

🤖 Artificial Intelligence
☁️ Cloud and Infrastructure
💾 Data and Databases
💼 Professional Skills
🎯 Programming and Development
🔒 Security and Networking
📚 Specialized Topics
HomeAboutTopicsPricingMy VaultStats
LEVEL 0
0/5 XP
GitHub
© 2026 CheatGrid™. All rights reserved.
Privacy PolicyTerms of UseAboutContact

File Permissions Cheat Sheet

File Permissions Cheat Sheet

Back to Operating Systems and CLI
Updated 2026-05-25
Next Topic: find and File Search Commands in Linux Cheat Sheet

File permissions in Unix-like systems control who can read, write, or execute files and directories, forming the foundation of system security and access control. The POSIX permission model defines three classes (owner, group, others) and three basic operations (read, write, execute), but modern Linux extends this with ACLs for granular control, special permissions for privilege escalation, and mandatory access control systems like SELinux and AppArmor. Understanding how octal and symbolic notation work together, how umask sets defaults, and when to use extended attributes versus capabilities is essential for maintaining secure, properly isolated systems—especially in multi-user environments where effective permissions must be calculated across multiple layers.


What This Cheat Sheet Covers

This topic spans 20 focused tables and 169 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.

Table 1: Basic Permission TypesTable 2: Permission ClassesTable 3: Octal NotationTable 4: Symbolic NotationTable 5: Special PermissionsTable 6: Common chmod CommandsTable 7: Ownership and Group CommandsTable 8: Viewing PermissionsTable 9: Default Permissions and umaskTable 10: Access Control Lists (ACLs)Table 11: File-System Extended Attributes (chattr/lsattr)Table 12: User Extended Attributes (xattr)Table 13: SELinux ContextsTable 14: Linux CapabilitiesTable 15: AppArmor ProfilesTable 16: Combining CommandsTable 17: Permission CalculationTable 18: Security Best PracticesTable 19: Common PitfallsTable 20: Querying and Troubleshooting

Table 1: Basic Permission Types

The three basic permission bits apply differently to files and directories — x on a directory means enter, not run. Knowing what each bit actually does on each object type prevents the most common misconfiguration mistakes.

PermissionExampleDescription
Read (r)
cat file.txt
• On files: allows viewing contents
• On directories: allows listing entries with ls
• octal value 4.
Write (w)
echo "text" > file.txt
• On files: allows modifying contents
• On directories: allows creating/renaming/deleting files within it
• octal value 2.

More in Operating Systems and CLI

  • Environment Variables and Shell Configuration Files Cheat Sheet
  • find and File Search Commands in Linux Cheat Sheet
  • AWS CLI Cheat Sheet
  • Linux Bash Cheat Sheet
  • nftables Modern Linux Firewall Cheat Sheet
  • tar gzip zip Archive and Compression Tools Cheat Sheet
View all 51 topics in Operating Systems and CLI