Linux Permissions Made Simple

 

Linux file permissions can feel confusing at first because they look compact and unforgiving. The good news is that they follow a predictable pattern, and once you understand that pattern, permissions become straightforward to work with. This guide walks through Linux permissions slowly and practically, using real terminal commands you can try yourself.

The goal is not to memorize everything, but to understand what you are looking at and make safe, confident changes when needed. All examples below come directly from the original script .


Step 1: Look at File Permissions First

Before changing permissions, always look at the current state. Linux never hides this information.

Run this command in a directory with files:

ls -l

Example output:

-rw-r--r-- 1 bo bo 1024 Jun 10 notes.txt

Your username, group name, file size, and date will be different. That is expected.

Focus only on the first section:

-rw-r--r--

This part controls access to the file.


Step 2: Read, Write, and Execute

Linux permissions use three letters:

  • r means read the file

  • w means change the file

  • x means run the file

If a letter is missing, that permission is not allowed.

This simple rule applies everywhere in Linux.


Step 3: Who Permissions Apply To

Permissions are split into three groups:

rw-   r--   r--

They represent:

  • The file owner

  • The group

  • Everyone else

The owner is usually the user who created the file.
A group is just a named set of users on the system.


Step 4: Why Execute Permission Matters

In Linux, a script is just a text file. It only becomes runnable when execute permission is allowed.

Try running a script without execute permission:

./script.sh

Output:

permission denied

Linux checks permissions before running anything, every time. This behavior is predictable and intentional.


Step 5: Add Execute Permission Safely

The chmod command changes permissions. The simplest safe change is adding execute permission.

chmod +x script.sh

Verify the change:

ls -l script.sh

Example output:

-rwxr-xr-x 1 bo bo 2048 Jun 10 script.sh

The script can now run.


Step 6: Remove Execute Permission

Permissions can also be removed just as easily.

chmod -x script.sh

Check again:

ls -l script.sh

Output:

-rw-r--r-- 1 bo bo 2048 Jun 10 script.sh

Step 7: Target Specific Users

chmod follows one simple pattern:

who + or – permission

  • u for owner

  • g for group

  • o for others

Example: only allow the owner to execute the script.

chmod u+x script.sh

Result:

-rwxr--r-- 1 bo bo 2048 Jun 10 script.sh

Common Beginner Mistakes

Changing the wrong file
Always confirm permissions first with:

ls -l

Forgetting execute permission
If you see “permission denied,” check for x.

Using sudo unnecessarily
If ls -l shows your username as the owner, you do not need sudo.


Real-World IT Example

You deploy a maintenance script on a Linux server. The file exists, but automation fails because it will not run.

Fix:

chmod +x maintenance.sh

Now the script works:

  • Manually

  • From cron

  • From automation tools

This is a daily task in Linux administration.


Safety Boundary for Beginners

Practice permission changes only on files in your home directory.
Do not change permissions in system directories like /etc or /bin yet.
This avoids breaking your system while you learn.


A Small Next Step

Once this feels natural, the next step is learning numeric permissions like 755. Only move on after symbolic permissions feel comfortable.


Conclusion

Linux permissions are not random or fragile. They follow a clear structure, and once you slow down and read them carefully, they become predictable. Work through these steps a few times, and confidence will replace confusion.