Practice Use drills for recall and labs for real operating judgment.

LAB-PERM-03 - Numeric Permissions (Octal)

Translate basic rwx patterns into numeric modes such as 644, 755, and 600 so common Linux permission states become recognizable and usable.

ACL Permission Management

Numeric Permissions (Octal)

Translate basic rwx patterns into numeric modes such as 644, 755, and 600 so common Linux permission states become recognizable and usable.

30 min INTERMEDIATE LINUX Curriculum-reviewed
Success criteria
  • Convert common rwx states into numeric modes.
  • Use numeric chmod in a practice folder without overwriting by accident elsewhere.
Safety notes
  • Numeric chmod replaces the full mode, so use it only when you mean the full state.

Part A: The Field Guide

Numeric modes are a faster way to express full permission states.

The point values are:

  • read = 4
  • write = 2
  • execute = 1

You add the values inside each chunk:

  • 7 means rwx
  • 6 means rw-
  • 5 means r-x
  • 4 means r--
  • 0 means ---

So a mode like 755 means:

  • owner: 7 = rwx
  • group: 5 = r-x
  • other: 5 = r-x

Use Numeric Modes Deliberately

Numeric chmod replaces the full owner, group, and other state in one step. That is powerful, but less surgical than symbolic chmod.

Common beginner-friendly modes

  • 644 for a normal readable file
  • 755 for a typical executable or directory
  • 600 for a private file

Part B: The Drill Deck

Terminal required: keep everything in a practice folder.

G
Guided Step by step - type exactly this and compare the result
>

Exercise G1: Create practice files

  1. Run mkdir -p ~/perm_lab && cd ~/perm_lab
  2. Run touch web.txt script.sh secret.key

Exercise G2: Apply the common modes

  1. Run chmod 644 web.txt
  2. Run chmod 755 script.sh
  3. Run chmod 600 secret.key
  4. Run ls -l
  5. Match each file to its expected purpose

Exercise G3: Translate one string back to numbers

  1. Pick one result from ls -l
  2. Translate the owner, group, and other chunks back into digits
  3. Confirm that the digit sequence matches the mode you used
S
Solo Task described, hints available - figure it out
>

Exercise S1: Mental translation

Convert these modes into permission strings for regular files:

  1. 744
  2. 640
  3. 400
  4. 775

Exercise S2: Reverse translation

Convert these strings into numeric modes:

  1. -rw-rw-r--
  2. -rwxr-xr-x
  3. -rw-------
M
Mission Real scenario - no hints, combine multiple skills
>

Mission M1: Set a safe file-and-folder pair

In your sandbox:

  1. create a folder called appdir
  2. create a file inside it called config.txt
  3. set the directory to a mode appropriate for traversal by others but not writing by others
  4. set the file to a mode appropriate for reading by others but writing only by you
  5. explain why the directory and file use different numeric modes

If you can do that and explain the difference, octal permissions are becoming practical knowledge instead of just math.