XK0-006 Services and User Management Practice Question
A team wants a shared directory /srv/project where members of the group devteam can create and edit files, but files created by one member must remain editable by other members. The directory is on an ext4 filesystem, and the team does not want to manually change group ownership on every new file. Which command set achieves this?
⚠ Common exam trap
Many candidates confuse the sticky bit with the setgid bit; the sticky bit controls deletion in shared directories, while setgid controls group inheritance for new files.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
chgrp devteam /srv/project && chmod 2775 /srv/project
The setgid bit on a directory causes new entries to inherit the directory's group rather than the creator's primary group. Pairing that with group ownership of devteam and mode 2775 gives the group read, write, and execute on the directory, so members can create and modify files. This is the traditional Unix approach for shared group workspaces and works on ext4 without additional ACL configuration.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
setfacl -R -m g:devteam:rwx /srv/project && setfacl -R -d -m g:devteam:rwx /srv/project
Why it's wrong here
Default ACLs would indeed make new files inherit group permissions for devteam, but this scenario is on ext4 and the question asks for a command set that achieves group inheritance. The setgid approach is the standard, simpler mechanism that does not depend on ACL support being enabled and mounted. While ACLs can work, the setgid method directly satisfies the stated goal without extra ACL tooling.
- ✗
chown :devteam /srv/project && chmod 1777 /srv/project
Why it's wrong here
Mode 1777 sets the sticky bit, which restricts deletion of files to their owners and the directory owner. It does not cause new files to inherit the devteam group; they will be owned by the creating user's primary group. As a result, other devteam members may lack group write access to those files, failing the requirement that all members can edit each other's files.
- ✓
chgrp devteam /srv/project && chmod 2775 /srv/project
Why this is correct
Setting the group to devteam and applying mode 2775 sets the setgid bit on the directory. On ext4, new files and subdirectories inherit the directory's group, so files created by any devteam member stay group-owned by devteam. Combined with group write permission (the 7 in the group position includes write), members can edit each other's files without manual chgrp.
- ✗
chmod g+s /srv/project && chmod o+t /srv/project
Why it's wrong here
The setgid bit is correct for group inheritance, but adding the sticky bit (o+t) limits deletion to file owners, which can hinder collaborative cleanup and does not address group ownership of new files. The command also omits changing the directory's group to devteam and does not ensure group write permission, so it does not fully meet the requirement that members can edit each other's files.
Visual reference
Go deeper
Related to this question
Learn chapter
File Permissions and Ownership
Key term
ext4
ext4 is the default file system for many Linux distributions, designed to store and manage files on a hard drive or SSD with journaling, large volume support, and backward compatibility.
Key term
ACL
An Access Control List is a set of rules that determines who or what can access specific network resources or data.
About these practice questions
One of 781 original XK0-006 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official CompTIA exam blueprint
This XK0-006 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the XK0-006 exam.