From e2e68916a5832e38e7e6dd9cd48598fdacc7e213 Mon Sep 17 00:00:00 2001
From: VineetPadole <vineetpadole137@gmail.com>
Date: Fri, 1 May 2026 14:51:04 +0000
Subject: [PATCH] chmod: clarify numeric mode description

The existing description of the numeric modes is dense and combines multiple concepts in a single paragraph.

Restructure the section to separate digit roles and improve readability. Add a concise mapping of octal values to permission bits for quick reference.

No functional changes.
---
 man/chmod.x | 34 ++++++++++++++++++++++++++--------
 1 file changed, 26 insertions(+), 8 deletions(-)

diff --git a/man/chmod.x b/man/chmod.x
index 39749f0bf..32bede956 100644
--- a/man/chmod.x
+++ b/man/chmod.x
@@ -50,14 +50,32 @@ and the permissions granted to users that are in neither of the two preceding
 categories (\fBo\fP).
 .PP
 A numeric mode is from one to four octal digits (0\-7), derived by
-adding up the bits with values 4, 2, and 1.  Omitted digits are
-assumed to be leading zeros.
-The first digit selects the set user ID (4) and set group ID (2) and
-restricted deletion or sticky (1) attributes.  The second digit
-selects permissions for the user who owns the file: read (4), write (2),
-and execute (1); the third selects permissions for other users in the
-file's group, with the same values; and the fourth for other users not
-in the file's group, with the same values.
+adding the values of permission bits: read (4), write (2), and
+execute (1).  Omitted digits are assumed to be leading zeros.
+
+Each digit applies to a different class of users:
+
+.TP
+First digit
+Special mode bits: set-user-ID (4), set-group-ID (2), and sticky (1).
+
+.TP
+Second digit
+Permissions for the file owner.
+
+.TP
+Third digit
+Permissions for users in the file's group.
+
+.TP
+Fourth digit
+Permissions for other users.
+
+Values 0 through 7 correspond to the following permissions:
+0 (---), 1 (--x), 2 (-w-), 3 (-wx), 4 (r--), 5 (r-x), 6 (rw-), 7 (rwx).
+
+For example, a value of 7 grants read, write, and execute permissions
+(4+2+1), while 5 grants read and execute permissions (4+1).
 .PP
-- 
2.43.0

