Difficulty: Easy
Correct Answer: chmod u=rwx,g=rw,o=x note
Explanation:
Introduction / Context:
Understanding UNIX/Linux permissions is essential for system administration and secure software development. Permissions can be set either with octal numbers (like 761) or with symbolic expressions (like u=rwx,g=rw,o=x). This question checks whether you can translate octal permission codes into their exact symbolic equivalents for user (u), group (g), and others (o).
Given Data / Assumptions:
Concept / Approach:
Octal permission digits map to read (4), write (2), and execute (1) bits. Sum the bit values per class. Left to right the octal digits represent user, group, and others. Translate each digit to the corresponding r, w, x letters in symbolic notation.
Step-by-Step Solution:
Verification / Alternative check:
Run ls -l note after applying permissions. You should see rwxrw--x (or equivalent, depending on default umask and file type) aligning with 761.
Why Other Options Are Wrong:
a: chmod 167 note reorders classes (would set u=1,g=6,o=7), not the intended 761 mapping.
c: Misspelled command and invalid syntax.
d: There is no syntax like 4=7 in chmod; classes are u, g, o (or a).
e: Not applicable because the correct symbolic form is available.
Common Pitfalls:
Confusing the order of classes (u,g,o), forgetting that 6 means rw (no x), or mixing up symbolic add mode (u+x) with full assignment mode (u=...).
Final Answer:
chmod u=rwx,g=rw,o=x note
Discussion & Comments