Operations 6 min read

Master Linux File Permissions: Symbolic & Numeric chmod Guide

This article explains Linux file permission concepts, the meaning of permission bits, file types, how to interpret ls -l output, and provides practical examples of using chmod in both symbolic and numeric modes to control access for owners, groups, and others.

Liangxu Linux
Liangxu Linux
Liangxu Linux
Master Linux File Permissions: Symbolic & Numeric chmod Guide

Introduction

Linux assigns three basic access modes—read, write, and execute—to each file. These permissions are applied to three categories of users: the file owner, members of the owner’s group, and all other users.

File Types and Permission Bits

When a directory is listed with ls -l (or ll), the first column shows a 10‑character string such as drwxr-xr-x. The first character indicates the file type: d – directory l – symbolic link - – regular file s – socket b – block device c – character device p – FIFO (named pipe)

The remaining nine characters are three groups of rwx, representing read, write, and execute permissions for the owner, the group, and others respectively. A dash ( -) means that particular permission is not granted.

Interpreting ls -l Output

[root@VM_0_14_centos ~]# ll
total 32
drwxr-xr-x 4 root root 4096 Nov 28 00:09 group-chat
-rwxr--r-- 1 root root 2303 Sep 17 11:31 start_sb_app.sh
...

Key fields:

total 32 – total size of files in the directory (in blocks)

drwxr-xr-x – file type and permission bits

4 – number of hard links

root – owner name

root – group name

4096 – file size in bytes

Nov 28 00:09 – last modification timestamp

group-chat – file or directory name

Changing Permissions with chmod

Symbolic mode

General syntax: chmod [who]operator[permission] filename who can be: u – owner g – group o – others a – all (owner, group, others)

operator can be: + – add permission - – remove permission = – set exact permission (clears unspecified bits)

permission letters: r – read w – write x – execute

Examples (assuming myfile initially has rwxrwxrwx): chmod a-x myfilerw-rw-rw- (remove execute from everyone) chmod go-w myfilerw-r--r-- (remove write from group and others) chmod u+x myfilerwxr--r-- (add execute for the owner)

Numeric (absolute) mode

Permissions can also be expressed as three octal digits. Each digit is the sum of read (4), write (2), and execute (1) bits for owner, group, and others.

Examples: chmod 777 myfilerwxrwxrwx (full access for everyone) chmod 644 myfilerw-r--r-- (owner read/write, group and others read only) chmod 444 myfiler--r--r-- (read‑only for all users)

Permission bits diagram
Permission bits diagram
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.

LinuxchmodFile Permissionssystem-administration
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

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.