CompTIA Linux+ (XK0-005) — Question 226

A developer wants to ensure that all files and folders created inside a shared folder named /Group00DEV inherit the group name of the parent folder. Which of the following commands will help achieve this goal?

Answer options

Correct answer: D

Explanation

The correct command is 'chmod g+s /Group00DEV/' which sets the setgid bit, ensuring that new files and directories inherit the group ID of the parent directory. The other options (A, B, and C) change permissions but do not affect the group inheritance behavior, making them ineffective for this requirement.