Operations 3 min read

Linux File and Directory Permission Management Tutorial

This tutorial explains Linux file and directory permission management, covering permission categories, how to view, add, revoke, and recursively apply permissions using commands such as ls, chmod, and demonstrates permission notation with examples.

DevOps Cloud Academy
DevOps Cloud Academy
DevOps Cloud Academy
Linux File and Directory Permission Management Tutorial

This guide introduces the fundamentals of managing file and directory permissions on Linux systems.

Permission categories : read (r), write (w), execute (x) correspond to numeric values 4, 2, and 1 respectively; combinations form the familiar three‑digit mode (e.g., 644, 777).

Viewing permissions : use ls -l (or ll) to list files. The first character indicates the type ( d for directory, - for regular file) followed by three groups of three characters representing user, group, and others permissions.

Permission string breakdown :

-rw- --- ---
First character: file or directory type
The next nine characters are divided into three groups of three:
1. User permissions – owner of the file
2. Group permissions – users belonging to the file's group
3. Others permissions – all other users

Adding permissions : chmod 777 filerwxrwxrwx (full access for everyone) chmod 644 filerw-r--r-- (owner read/write, group and others read‑only, the default mode)

Individual permission changes : chmod u+x b.txt – add execute permission for the owner (user) chmod g+x b.txt – add execute permission for the group chmod o+x b.txt – add execute permission for others

Revoking permissions : chmod 400 c.txt – set read‑only for the owner, no permissions for group/others chmod u-r c.txt – remove read permission from the owner

Recursive permission changes : chmod -R a /path/to/dir applies the specified mode to all files and sub‑directories under a.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

OperationsLinuxSystem AdministrationchmodFile Permissions
DevOps Cloud Academy
Written by

DevOps Cloud Academy

Exploring industry DevOps practices and technical expertise.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.