ABK TechnologiesPractical technology for real-world impact
Request a Quote

← Back to Insights

Understanding Linux File Permissions and Ownership: A Beginner’s Guide

November 27, 2026 · 9 min read

Linux file permissions explained with rwx permission symbols, owner, group, others, chmod, chown and chgrp commands.

Have you ever tried opening a file in Linux and received a message saying “Permission denied”?

Perhaps you attempted to edit a configuration file, execute a script, or access a directory, but Linux refused to let you proceed.

If this has happened to you, you’re already familiar with one of the most important security features of Linux: file permissions and ownership.

Linux is designed to support multiple users working on the same system. Not everyone should have unrestricted access to every file, application, or directory. Imagine what would happen if every user could modify important system files or access another person’s private documents.

To prevent this, Linux uses a permission system that determines who can read, write, and execute files.

Understanding Linux permissions is essential if you’re interested in Linux administration, cybersecurity, DevOps, cloud computing, or server management.

In this tutorial, we’ll explain how Linux file permissions work, how ownership is assigned, and how to manage access using practical commands.

Let’s get started!

1. What Are Linux File Permissions?

Linux file permissions are security rules that control what users can do with files and directories.

For example, imagine you have a text file containing personal information.

You might want:

  • Yourself to read and modify the file.
  • Members of your team to read it.
  • Other users on the system to have no access.

Linux permissions allow you to establish these restrictions.

Every file and directory has an associated owner, a group, and permission settings.

These permissions determine which operations are allowed for different categories of users.

2. Understanding the Three Permission Categories

Linux organizes file permissions into three main categories.

A. User (Owner)

The user, commonly represented by u, is the account that owns the file.

For example, if John creates a file called report.txt, John will normally become its owner.

The owner can be given permission to read, write, or execute the file.

B. Group

The group, represented by g, refers to a group of users associated with the file.

For example, a company might have a Linux group called developers.

Files owned by this group can be accessed by users who belong to it, according to the permissions assigned.

This is particularly useful when multiple people need to work on shared projects.

C. Others

Others, represented by o, refers to users who are neither the file owner nor members of the file’s associated group.

You can grant or restrict their access independently.

For example, you might allow the owner to modify a document, allow the group to read it, and prevent everyone else from accessing it.

3. Understanding the Three Basic Linux Permissions

Linux uses three fundamental permission types.

Read (r)

Read permission allows a user to view the contents of a file.

For directories, read permission allows a user to list the directory’s entries, although additional permissions may be needed to access those entries.

Write (w)

Write permission allows a user to modify a file’s contents.

For directories, write permission allows a user to create, delete, and rename entries, subject to other required permissions.

Execute (x)

Execute permission allows a user to run an executable file or script.

For directories, execute permission allows a user to enter or traverse the directory when the necessary permissions are available.

These three permissions form the foundation of Linux access control.

4. How to View File Permissions in Linux

Now that you understand the permission categories, let’s see how Linux displays them.

Open your terminal and run:

ls -l

You might see something like this:

-rwxr-xr-- 1 john developers 1024 Nov 20 10:30 script.sh

At first, this might look confusing, but let’s break it down.

-rwxr-xr--

This is the permission section.

It contains ten characters:

Let’s examine the example:

-rwxr-xr--
  • - – This is a regular file.
  • rwx – The owner can read, write, and execute.
  • r-x – The group can read and execute.
  • r-- – Others can only read.

The remaining information in the ls -l output includes:

  • john – File owner.
  • developers – Associated group.
  • 1024 – File size in bytes.
  • Nov 20 10:30 – Last modification date and time.
  • script.sh – File name.

You can now look at a Linux permission string and understand what it means.

5. Understanding Linux Permission Numbers: 755, 644 and More

One of the most interesting things about Linux permissions is that you can represent them using numbers.

This system is called numeric or octal permission notation.

Each permission has a numerical value:

To calculate a permission value, you add the numerical values together.

For example:

Read + Write + Execute

4 + 2 + 1 = 7

Read + Execute

4 + 1 = 5

Read only

4 = 4

Read + Write

4 + 2 = 6

This gives us a way to represent permissions using three numbers.

The first number represents the owner, the second represents the group, and the third represents others.

What Does 755 Mean?

Consider:

chmod 755 script.sh

The permission value 755 means:

  • Owner: 7 = Read, Write, Execute.
  • Group: 5 = Read, Execute.
  • Others: 5 = Read, Execute.

In other words, the owner can modify and execute the file, while the group and other users can read and execute it.

What Does 644 Mean?

Consider:

chmod 644 document.txt

This means:

  • Owner: 6 = Read and Write.
  • Group: 4 = Read only.
  • Others: 4 = Read only.

This is a common permission setting for ordinary files that should be editable by their owner but readable by other users.

Other Common Permission Values

Important security advice: Avoid using 777 unless you have a specific, justified requirement. It gives everyone read, write, and execute permissions, potentially exposing your files to unwanted modification or execution.

6. The chmod Command: Changing File Permissions

Now let’s move from theory to practice.

The Linux command used to change file permissions is:

chmod

The name comes from Change Mode.

You can use it to modify who can read, write, and execute a file or directory.

There are two common ways to use chmod: numeric notation and symbolic notation.

A. Using Numeric Permissions

Suppose you have a script called backup.sh.

You want to give the owner full permissions while allowing the group and others to read and execute it.

Run:

chmod 755 backup.sh

To make a private document accessible only to its owner:

chmod 600 private.txt

To make a document readable by everyone but writable only by its owner:

chmod 644 document.txt

B. Using Symbolic Permissions

Instead of using numbers, you can use letters to specify permission changes.

The main symbols are:

  • u – Owner.
  • g – Group.
  • o – Others.
  • a – All users.
  • + – Add permissions.
  • - – Remove permissions.
  • = – Set permissions exactly.

For example:

Give the owner execute permission:

chmod u+x script.sh

Remove write permission from others:

chmod o-w document.txt

Give the group read permission:

chmod g+r document.txt

Give everyone read permission:

chmod a+r document.txt

Symbolic permissions are useful when you want to make a specific change without replacing the entire permission configuration.

7. The chown Command: Changing File Ownership

Permissions determine what users can do with a file, but ownership determines who owns it.

Linux uses the chown command to change file ownership.

chown stands for Change Owner.

Suppose you have a file called report.txt and want to assign ownership to a user named john.

Run:

sudo chown john report.txt

This changes the file owner to john.

You can also change both the owner and group:

sudo chown john:developers report.txt

Now:

  • Owner: john.
  • Group: developers.

To change ownership of a directory and everything inside it, use the recursive option:

sudo chown -R john:developers Projects/

Important: Recursive ownership changes can affect many files. Always verify the target directory before using -R, especially on production servers.

8. The chgrp Command: Changing Group Ownership

Sometimes you don’t need to change the file owner. You only need to change its associated group.

That’s where chgrp comes in.

The command stands for Change Group.

For example:

sudo chgrp developers report.txt

This changes the group ownership of report.txt to developers.

You can also change the group of an entire directory and its contents:

sudo chgrp -R developers Projects/

This is particularly useful when setting up shared directories for development teams or departments.

9. Understanding the Difference Between chmod, chown and chgrp

These three commands are closely related, but they perform different tasks.

Here’s a simple way to remember them:

  • chmod controls what users can do.
  • chown determines who owns the file.
  • chgrp determines which group is associated with the file.

Together, these commands provide important tools for managing Linux access control.

10. Understanding File Permissions Versus Directory Permissions

There is an important difference between file permissions and directory permissions.

The same permission symbols have slightly different meanings depending on whether they are applied to a file or directory.

For example, a user might have permission to read a file but still be unable to access it if they cannot traverse one of its parent directories.

This is why Linux permissions must be understood in the context of the entire directory path.

11. Practical Exercise: Managing Linux File Permissions

Let’s practise what we’ve learned.

Imagine you are creating a project folder for a small development team.

You want to create a directory, add a file, and configure its permissions.

Follow these steps.

Step 1: Create a project directory

mkdir LinuxPermissions

Step 2: Enter the directory

cd LinuxPermissions

Step 3: Create a file

touch project.txt

Step 4: Check the current permissions

ls -l project.txt

Step 5: Give the owner read and write permissions, while allowing everyone else to read

chmod 644 project.txt

Step 6: Check the updated permissions

ls -l project.txt

You should see something similar to:

-rw-r--r-- 1 john john 0 Nov 20 10:30 project.txt

Step 7: Change the permissions so only the owner has access

chmod 600 project.txt

Step 8: Verify the result

ls -l project.txt

The permission section should now look like:

-rw-------

Congratulations! You have successfully created a file, inspected its permissions, modified access, and verified the result.

You have just performed one of the fundamental tasks involved in Linux system administration.

12. Additional Security: Why Linux Permissions Matter

Linux file permissions are not simply about organizing files. They are an important part of operating system security.

Consider a Linux web server hosting a business website.

Different accounts and services may need access to different resources.

For example:

  • The website’s service account may need permission to read application files.
  • A deployment account may need permission to update website content.
  • Database credentials should be protected from unauthorized users.
  • Configuration files should not be freely editable by everyone.

If permissions are configured incorrectly, attackers or unauthorized users may gain access to sensitive information or modify files they should not be able to change.

This is why system administrators follow the principle of least privilege.

The principle of least privilege means giving users and applications only the permissions they need to perform their tasks, and no more.

For example, a user who only needs to read a document should not automatically receive permission to modify or execute it.

Good permission management helps reduce unnecessary access and strengthens system security.

Conclusion

Linux file permissions and ownership are among the most important concepts to understand when learning Linux.

They determine who can access files, who can modify them, and who can execute programs.

In this tutorial, we’ve explored the three permission categories, the read, write, and execute permissions, numeric values such as 755 and 644, and the commands used to manage permissions and ownership.

Remember these three essential commands:

  • chmod – Change permissions.
  • chown – Change ownership.
  • chgrp – Change group ownership.

You don’t have to master everything immediately. Open your Linux terminal, create a practice directory, and experiment with the commands introduced in this guide.

As you become more comfortable with Linux permissions, you’ll be better prepared to manage multi-user systems, secure servers, and troubleshoot access-related problems.

Understanding permissions is not just about making files accessible. It’s about controlling access and protecting your Linux system.

In the next article in our Friday Linux Learning Series, we’ll explore how to install, update, and manage software in Linux using package managers.

Keep learning. Keep practising. Keep building.

Oh hi there 👋
It’s nice to meet you.

Sign up to receive awesome content in your inbox, every week.

We don’t spam! Read our privacy policy for more info.

Related articles

Information Technology

Why a Core i5 Can Be Faster Than a Core i7: Understanding Intel Processor Names

Have you ever wondered why a laptop with an Intel Core i5 processor can sometimes perform better than another laptop with an Intel Core…

Read article
AI

Practical Technology Solutions for Businesses, Churches and Organisations: Understanding ABK Technologies’ New Service Packages

Technology has become an important part of how businesses operate, communicate with customers, deliver services, and grow. Whether you run a small business, manage…

Read article
Information Technology

15 Essential Linux Commands Every Beginner Should Know

If you have recently started learning Linux, one of the first things you will notice is how much work can be done through the…

Read article

← Back to Insights


Join the conversation

Leave a comment

Your email address will not be published. Comments are reviewed before they appear.