File Ownership & Permissions (Users & Permissions)

Detailed Real-World Production Scenario

Introduction

File ownership and permissions are one of Linux's most important security features. Every file and directory in Linux has an owner, an associated group, and a set of permissions that determine who can access or modify it.

Understanding these concepts is essential for anyone working in DevOps because almost every server, container, CI/CD pipeline, Kubernetes node, and cloud virtual machine runs Linux.

Misconfigured permissions are one of the most common causes of deployment failures, application errors, and security vulnerabilities.

What is File Ownership?

Every file in Linux belongs to:

For example:

-rwxr-x--- 1 tom devops 1200 Jul 11 deploy.sh

This tells us:

The owner usually has the highest level of control over the file, while members of the assigned group inherit the group's permissions.

What are File Permissions?

Linux controls access using three basic permissions:

Permission Meaning Numeric Value
r Read 4
w Write 2
x Execute 1

Permissions are applied separately to: