DEV Community

Cover image for Linux Learning Journey – Day 12: File Permissions & Ownership in Ubuntu πŸ§πŸ”
Avinash wagh
Avinash wagh

Posted on

Linux Learning Journey – Day 12: File Permissions & Ownership in Ubuntu πŸ§πŸ”

After understanding how to inspect users and groups on Day 11, Day 12 focused on one of the most critical security concepts in Linux: file permissions and ownership.

In Linux, everything is a fileβ€”and controlling who can read, write, or execute those files is fundamental to system security, stability, and access control.

πŸ”Ή Why File Permissions Matter

In real-world systemsβ€”especially servers and cloud environmentsβ€”incorrect file permissions can lead to:

  • Unauthorized access
  • Application failures
  • Security vulnerabilities
  • Data loss or corruption

Linux solves this with a simple yet powerful permission model.

πŸ”Ή Understanding Linux File Permissions

Each file or directory has three permission types:

- r (read) – View file contents or list directory
- w (write) – Modify file contents or directory entries
- x (execute) – Run a file or access a directory

And these permissions apply to three entities:

- User (owner)
- Group
- Others

πŸ”Ή Commands I Learned & Practiced
πŸ”Έ ls -l β€” View File Permissions

Used to display detailed file information, including:

- Permission bits
- Owner
- Group
- File type

This command helped me read and interpret permission structures clearly.

πŸ”Έ chmod β€” Change File Permissions

Used to modify permissions using:

- Symbolic mode (u+r, g-w, o+x)
- Numeric mode (755, 644, etc.)

This made it clear how Linux translates numbers into access control.

πŸ”Έ chown β€” Change File Owner

Used to change the user ownership of files and directories.

Very important for:

- Application deployments
- Service accounts
- Log and config file access

πŸ”Έ chgrp β€” Change Group Ownership

Used to assign files to specific groups, enabling s*hared access without exposing files publicly*.

Commonly used in team-based environments.

πŸ”Έ umask β€” Default Permission Control

Learned how umask defines default permissions for newly created files and directories.

This is crucial for:

- Security-by-default setups
- Preventing overly open permissions

βœ”οΈ What This Helped Me Understand

  • How Linux enforces access control at the file level
  • How permissions protect system and user data
  • How ownership affects application behavior
  • Why permission issues are a common root cause of errors
  • How to debug β€œPermission denied” problems efficiently

πŸš€ Day 12 Takeaway

Day 12 strengthened my understanding of Linux security fundamentals.

I now feel confident in:

  • Reading and modifying file permissions
  • Managing file ownership correctly
  • Using umask for secure defaults
  • Troubleshooting permission-related issues
  • Applying best practices in real-world systems

File permissions are not just a Linux conceptβ€”they are a security mindset.

πŸ”‘ Control access. Protect data. Build secure systems.

Consistency remains the real superpower πŸ’ͺ🐧

Others

Top comments (0)