In UNIX/Linux file permissions, what does the second permission triad (e.g., r--) indicate for the file's group?
-
Agroup has read permission only
-
Bother has read permission only
-
Cowner has read permission only
-
Dgroup has write permission only
-
ENone of the above
Answer
Correct Answer: group has read permission only
Explanation
Introduction / Context:UNIX file metadata shows three permission triads in ls -l output: owner, group, and others. Correctly interpreting the second triad is essential for understanding which users can read, write, or execute a file within a shared group, influencing collaboration and security settings.
Given Data / Assumptions:
- Standard permission string like -rw-r--r--.
- Order of triads: owner, group, others.
- Notation r=read, w=write, x=execute, -=no permission.
Concept / Approach:
The second triad applies to the file's owning group. If it reads r--, it grants the group read-only access (no write, no execute). The first triad affects the owner; the third affects all other users. Therefore, r-- in the middle position means “group has read permission only.”
Step-by-Step Solution:
Identify triad positions: owner, group, others.Read the second triad value: r--.Map r-- to read-only permission.Conclude: group read-only.Verification / Alternative check:
Use stat -c %A file (Linux) or ls -l to confirm triad positions; modify with chmod g+r,g-wx file to explicitly set group read-only and verify result.
Why Other Options Are Wrong:
- other has read permission only: refers to the third triad, not the second.
- owner has read permission only: refers to the first triad.
- group has write permission only: would be -w-, not r--.
- None of the above: incorrect because the group interpretation is clear.
Common Pitfalls:
- Miscounting triad positions, especially with directory entries.
- Forgetting that execute on directories controls traversal, not execution.
Final Answer:
group has read permission only.