UNIX permissions refresher: The symbolic-mode equivalent of chmod 761 letter sets user, group, and other permissions. Which mapping expresses that setting correctly?

Difficulty: Easy

Correct Answer: chmod u = rwx, g = rw, o = x letter

Explanation:


Introduction / Context:
File permissions in UNIX can be specified numerically (octal) or symbolically. Understanding the mapping between octal digits and read/write/execute bits helps you interpret and apply correct access controls quickly and accurately.



Given Data / Assumptions:

  • The numeric mode is 761, applied to a file named letter.
  • Permission digits are ordered user (owner), group, and other.
  • Each octal digit encodes r=4, w=2, x=1.


Concept / Approach:

The octal mode 761 translates as: user 7 (4+2+1 = rwx), group 6 (4+2 = rw-), other 1 (001 = --x). Symbolic mode expresses the same as u=rwx, g=rw, o=x. Either style yields the same permission bits when applied with chmod.



Step-by-Step Solution:

Break 761 into digits: 7, 6, 1 for user, group, other.Map each digit to permissions: 7 -> rwx, 6 -> rw-, 1 -> --x.Form symbolic expression: u=rwx, g=rw, o=x.Apply with chmod u=rwx,g=rw,o=x letter to set the bits.Confirm with ls -l letter to see -rwxrw--x for a regular file.


Verification / Alternative check:

Use stat -c %A letter to view human-readable permissions and stat -c %a letter to confirm numeric mode 761 after the change.



Why Other Options Are Wrong:

a: The syntax chmod 4=7, g=6, o=1 is invalid and mixes numbers erroneously.

b: a=761 is not a valid symbolic-mode assignment; numeric modes are applied without a=.

d: 167 reorders the bits incorrectly; the intended value is 761.

e: Not applicable because the correct symbolic mapping is u=rwx, g=rw, o=x.



Common Pitfalls:

Confusing the order of user/group/other, misapplying execute bits on regular files, and forgetting that directories need x for traversal. Symbolic modes can add (+) or remove (-) bits for incremental changes.



Final Answer:

chmod u = rwx, g = rw, o = x letter

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion