CompTIA Linux+ (XK0-005) — Question 85
A Linux engineer receives reports that files created within a certain group are being modified by users who are not group members. The engineer wants to reconfigure the server so that only file owners and group members can modify new files by default. Which of the following commands would accomplish this task?
Answer options
- A. chmod 775
- B. umask. 002
- C. chattr -Rv
- D. chown -cf
Correct answer: B
Explanation
The correct answer is B, as setting the umask to 002 will ensure that newly created files have group write permission, allowing only owners and group members to modify them. Option A, chmod 775, changes permissions on existing files but does not affect new files. Options C and D are unrelated to setting default permissions for new files.