0
0
Linux CLIscripting~10 mins

Numeric permission mode (755, 644) in Linux CLI - Step-by-Step Execution

Choose your learning style9 modes available
Concept Flow - Numeric permission mode (755, 644)
Start with numeric mode
Split digits: Owner, Group, Others
Convert each digit to rwx
Apply permissions to file/folder
Check permissions with ls -l
End
This flow shows how numeric permission modes like 755 or 644 are split into owner, group, and others, then converted to read/write/execute permissions and applied to files.
Execution Sample
Linux CLI
chmod 755 file.txt
ls -l file.txt
Set file.txt permissions to 755 and then list its permissions.
Execution Table
StepActionInput Numeric ModeOwner PermissionGroup PermissionOthers PermissionResulting rwxCommand Output
1Start755
2Split digits755755
3Convert 7 to rwx7rwx
4Convert 5 to r-x5r-x
5Convert 5 to r-x5r-x
6Apply chmod755rwxr-xr-xrwxr-xr-x
7Check permissions-rwxr-xr-x 1 user group 0 date file.txt
8Start644
9Split digits644644
10Convert 6 to rw-6rw-
11Convert 4 to r--4r--
12Convert 4 to r--4r--
13Apply chmod644rw-r--r--rw-r--r--
14Check permissions-rw-r--r-- 1 user group 0 date file.txt
15End
💡 Execution stops after permissions are applied and verified with ls -l.
Variable Tracker
VariableStartAfter Step 2After Step 3/4/5After Step 6Final
Numeric Mode755755755755
Owner Digit7777
Group Digit5555
Others Digit5555
Owner rwxrwxrwxrwx
Group rwxr-xr-xr-x
Others rwxr-xr-xr-x
Permission Stringrwxr-xr-xrwxr-xr-x
Key Moments - 3 Insights
Why does the digit 7 translate to rwx?
Because 7 in binary is 111, which means read (4) + write (2) + execute (1) permissions are all set, as shown in execution_table rows 3 and 6.
Why does 5 translate to r-x and not rwx?
5 in binary is 101, meaning read (4) and execute (1) are set, but write (2) is not, as shown in execution_table rows 4, 5, and 6.
What does the permission string rw-r--r-- mean for 644?
It means owner can read and write, group and others can only read, matching digits 6 (rw-), 4 (r--), and 4 (r--) in execution_table rows 10-13.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table at step 3, what permissions does the owner get for digit 7?
Arwx
Brw-
Cr-x
Dr--
💡 Hint
Check the 'Owner rwx' column at step 3 in execution_table.
At which step does the group permission get converted for mode 755?
AStep 3
BStep 4
CStep 5
DStep 6
💡 Hint
Look at the 'Group Permission' and 'Resulting rwx' columns in execution_table.
If the numeric mode changed from 644 to 600, what would be the others permission?
Ar--
Brw-
C---
Drwx
💡 Hint
Refer to how digit '4' maps to 'r--' and '0' maps to '---' in execution_table rows 11-12.
Concept Snapshot
Numeric permission mode uses three digits: owner, group, others.
Each digit is a sum of read(4), write(2), execute(1).
Example: 7 = rwx (4+2+1), 5 = r-x (4+0+1), 4 = r-- (4+0+0).
Use chmod <mode> <file> to apply.
Check with ls -l to see permissions.
Full Transcript
Numeric permission modes like 755 or 644 are three-digit numbers representing file permissions for owner, group, and others. Each digit is a sum of read (4), write (2), and execute (1) permissions. For example, 7 means read, write, and execute are all allowed. The process starts by splitting the numeric mode into three digits, converting each digit to its rwx form, applying these permissions to the file using chmod, and then verifying with ls -l. This visual execution shows step-by-step how digits 7, 5, and 4 translate to rwx, r-x, and r-- respectively, and how the final permission string looks. Understanding this helps control who can read, write, or execute files on Linux systems.