XK0-004 · Question #403
A Linux administrator is configuring a group directory in which all members in the Admins group can share and edit files and create subdirectories with the same attributes. The administrator creates t
The correct answer is A. Chmod g+t /shared. NOTE: The marked answer A (chmod g+t /shared) appears to be an exam error. The correct answer for this scenario is D: 'chmod g+s /shared'. Setting the setgid bit on a directory causes all new files and subdirectories created within it to inherit the group ownership of the parent
Question
A Linux administrator is configuring a group directory in which all members in the Admins group can share and edit files and create subdirectories with the same attributes. The administrator creates the directory as follows:
Mkdir /shared Chgrp Admins /shared Which of the following command should the administrator execute so users can work in the directory as required?
Options
- AChmod g+t /shared
- BChmod 0666 /shared
- CChown Admins /shared
- DChmod g+s /shared
How the community answered
(23 responses)- A83% (19)
- B4% (1)
- C4% (1)
- D9% (2)
Explanation
NOTE: The marked answer A (chmod g+t /shared) appears to be an exam error. The correct answer for this scenario is D: 'chmod g+s /shared'. Setting the setgid bit on a directory causes all new files and subdirectories created within it to inherit the group ownership of the parent directory (Admins). This ensures all shared content maintains consistent group attributes, allowing every Admins group member to read and write files regardless of who created them. The sticky bit (g+t) serves a different purpose and is not the right tool here.
Topics
Community Discussion
No community discussion yet for this question.