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)