DEV Community

Cover image for Cloud Engineer Journey #3 - Understanding Linux File Permissions Simply
Joyal B Biju
Joyal B Biju

Posted on

Cloud Engineer Journey #3 - Understanding Linux File Permissions Simply

One of the most important concepts in Linux is file permissions.

At first, permissions may look confusing because of symbols like:

bash
-rwxr-xr--

But once you understand the basics, it becomes much easier.

And if you are learning Cloud or DevOps, understanding Linux permissions is extremely important because permissions help control:

  • who can access files,
  • who can modify them,
  • and who can execute programs.

Without proper permissions:

  • applications may fail,
  • scripts may not run,
  • services may stop working,
  • or systems may become insecure.

So in this post, let’s understand Linux permissions in a simple beginner-friendly way.


🐧 What Are Linux File Permissions?

Linux uses permissions to decide:

  • who can read a file,
  • who can edit a file,
  • and who can execute a file.

Think of permissions like access control in real life.

For example:

  • A house owner has full access
  • Family members may have limited access
  • Guests may only view certain things

Linux works in a very similar way.


🔐 Understanding Permission Symbols

Example:

-rwxr-xr--
Enter fullscreen mode Exit fullscreen mode

This line may look complicated, but it simply describes permissions.


📁 First Character

-
Enter fullscreen mode Exit fullscreen mode

or

d
Enter fullscreen mode Exit fullscreen mode

This tells us the file type.

  • - → normal file
  • d → directory (folder)

👤 Permission Groups

Linux permissions are divided into 3 groups:

Group Meaning
User File owner
Group Users in the same group
Others Everyone else

Example:

rwx r-x r--
Enter fullscreen mode Exit fullscreen mode

This is divided into:

  • User → rwx
  • Group → r-x
  • Others → r--

✨ What Do r, w, x Mean?

Symbol Meaning
r Read
w Write
x Execute

💡 Simple Explanation

Example:

rwx
Enter fullscreen mode Exit fullscreen mode

Means:

  • read ✅
  • write ✅
  • execute ✅

Another example:

r--
Enter fullscreen mode Exit fullscreen mode

Means:

  • read ✅
  • write ❌
  • execute ❌

🔢 Numeric Permissions

Linux also uses numbers for permissions.

Number Permission
7 rwx
6 rw-
5 r-x
4 r--

⚙️ chmod Command

The chmod command is used to change permissions.

Example:

chmod 755 script.sh
Enter fullscreen mode Exit fullscreen mode

This means:

  • User → full access (7)
  • Group → read & execute (5)
  • Others → read & execute (5)

🚀 Why Execute Permission Matters

Sometimes a script will not run because it does not have execute permission.

Example:

./deploy.sh
Enter fullscreen mode Exit fullscreen mode

You may see:

Permission denied
Enter fullscreen mode Exit fullscreen mode

Fix:

chmod +x deploy.sh
Enter fullscreen mode Exit fullscreen mode

Now the script becomes executable.

This is very common in Linux, AWS servers, and DevOps workflows.


👥 chown Command

The chown command changes file ownership.

Example:

sudo chown ec2-user:ec2-user file.txt
Enter fullscreen mode Exit fullscreen mode

This changes:

  • owner
  • and group ownership

Very useful while working with:

  • AWS EC2
  • Jenkins
  • Docker volumes
  • shared directories

☁️ Why Permissions Matter in Cloud & DevOps

Permissions are heavily used in:

  • Linux servers
  • AWS EC2 instances
  • Docker containers
  • Kubernetes
  • CI/CD pipelines

Incorrect permissions can:

  • break deployments,
  • stop applications,
  • or create security risks.

That’s why understanding permissions is one of the most important Linux skills.


🛠️ Mini Challenge

Try this on your Linux system or EC2 instance:

Task:

  1. Create a file called deploy.sh
  2. Add some text inside it
  3. Try running the file
  4. Notice the permission error
  5. Fix it using chmod
  6. Run the file again

👉 In the next post, I’ll explain the solution step by step.


🎯 Final Thoughts

Linux permissions may look difficult in the beginning, but they become much easier once you start practicing with real files and commands.

The goal is not to memorize symbols.

The goal is to understand:

  • who can access files,
  • what actions are allowed,
  • and how Linux protects systems using permissions.

Small concepts like these build the foundation for Cloud and DevOps engineering ☁️


If you are learning Linux, AWS, or Cloud basics and need help with even small doubts, feel free to connect with me through LinkedIn or email — always happy to learn and grow together 🚀

CloudEngineerJourney #Linux #AWS #DevOps #LinuxPermissions #BeginnerFriendly

Top comments (0)