"Mastering Linux File Permissions: A Step-by-Step Guide to Changing Ownership and Access Rights"

Gerald Jun 16, 2026

Changing Permissions in Linux: A Step-by-Step Guide

How to Recursively Change File Permissions in Linux - Make Tech Easier
How to Recursively Change File Permissions in Linux - Make Tech Easier

Linux provides a robust system for managing file and directory permissions, allowing users to grant or deny access to system resources. Understanding how to change permissions is essential for maintaining system security and functionality. In this article, we will explore the various ways to change permissions in Linux, including using the chmod command, the chown command, and the umount command.

Learn Linux from Beginner to Advanced (Part-5) | File Permissions & Ownership Commands
Learn Linux from Beginner to Advanced (Part-5) | File Permissions & Ownership Commands

The Basics of Linux Permissions

Linux uses a permission system that is based on the concept of access control lists (ACLs). Each file and directory has a set of permissions that define who can read, write, or execute the resource. The permissions are represented by three digits, each corresponding to the owner, group, and others, respectively. The digits use the following format:

Mastering Linux Permissions 🔐 | Beginner-Friendly Guide
Mastering Linux Permissions 🔐 | Beginner-Friendly Guide
Digit Description
rwx Read, Write, and Execute permissions
rw- Read and Write permissions
r-x Read and Execute permissions
-wx Write and Execute permissions
--- No permissions

Using the chmod Command

How to Change File Permissions on Linux Desktops
How to Change File Permissions on Linux Desktops

The chmod command is used to change the permissions of a file or directory. The command has two formats: the symbolic format and the absolute format.

In the symbolic format, you specify the action and the permission to set. The actions are:

  • s: set the permission
  • r: remove the permission
Linux File Permissions and Ownership Explained with Examples
Linux File Permissions and Ownership Explained with Examples

The permissions are represented by the following letters:

  • r: read permission
  • w: write permission
  • x: execute permission

Here are some examples of using the chmod command:

Master Linux Special Permissions: SUID, SGID, and Sticky Bit
Master Linux Special Permissions: SUID, SGID, and Sticky Bit

chmod u+x filename: adds execute permission to the owner of the file

chmod g-w filename: removes write permission from the group that owns the file

How to fix permission denied error in Linux? [Solutions]
How to fix permission denied error in Linux? [Solutions]
File and Directory Permissions
File and Directory Permissions
How to Copy File Permissions and Ownership to Another File in Linux
How to Copy File Permissions and Ownership to Another File in Linux
10 Examples of chmod command in UNIX Linux
10 Examples of chmod command in UNIX Linux
The Basics of File Permissions in Linux
The Basics of File Permissions in Linux
File Permissions in Linux / Unix: How to Read, Write & Change?
File Permissions in Linux / Unix: How to Read, Write & Change?
chmod – Change Access Mode
chmod – Change Access Mode
CHMOD Command | Change File Permissions in Linux
CHMOD Command | Change File Permissions in Linux
Learn how to change your password on Linux
Learn how to change your password on Linux
Linux File Permissions Tutorial For Beginners
Linux File Permissions Tutorial For Beginners
Linux Permissions: Mastering Access Control in Linux Permissions
Linux Permissions: Mastering Access Control in Linux Permissions
How to Remove a User from a Group in Linux? – A Complete Guide
How to Remove a User from a Group in Linux? – A Complete Guide
📁 chgrp: Change Group of File and Directory
📁 chgrp: Change Group of File and Directory
6 Changes Windows Users Need to Accept When Switching to Linux
6 Changes Windows Users Need to Accept When Switching to Linux
How to Change File Permissions Recursively With Chmod in Linux?
How to Change File Permissions Recursively With Chmod in Linux?
Change file ownership with CHOWN command in Linux (with examples)
Change file ownership with CHOWN command in Linux (with examples)
7 Linux Commands to Easily Manage File Permissions
7 Linux Commands to Easily Manage File Permissions
sudo - Run Commands with Superuser Privileges
sudo - Run Commands with Superuser Privileges
the linux file permision chart is shown in this screenshote, which shows how
the linux file permision chart is shown in this screenshote, which shows how
How to Change to the Previous Directory in the Linux Terminal
How to Change to the Previous Directory in the Linux Terminal

chmod o-r filename: removes read permission from others

Using the chown Command

The chown command is used to change the owner of a file or directory. The command has two formats: the recursive format and the non-recursive format.

In the recursive format, the command changes the owner of the file and all its contents. The non-recursive format only changes the owner of the specified file or directory.

Here are some examples of using the chown command:

chown user:group filename: changes the owner of the file to the specified user and group

chown -R user:group directory: changes the owner of all files and subdirectories in the specified directory to the specified user and group

Using the umount Command

The umount command is used to unmount a file system. This command is used to remove the file system from the Linux file system hierarchy.

Here are some examples of using the umount command:

umount /mnt: unmounts the file system at /mnt

umount -a: unmounts all file systems except the root file system

Best Practices for Changing Permissions

When changing permissions, it is essential to follow best practices to avoid compromising system security. Here are some guidelines to keep in mind:

1. Be cautious when using the chmod command, as it can easily introduce security vulnerabilities if used incorrectly.

2. Use the chown command to change the owner of a file or directory only when necessary, as it can also introduce security risks.

3. Always use the umount command to unmount file systems before making changes to the file system hierarchy.

4. Test your changes in a non-production environment before applying them to a production system.

Conclusion

Changing permissions in Linux requires a good understanding of the permission system and the various commands available. By following the guidelines outlined in this article, you can ensure that your system is secure and functional. Remember to be cautious when using the chmod and chown commands, and always use the umount command to unmount file systems before making changes to the file system hierarchy.