hardMultiple ChoiceObjective-mapped
XK0-006 Practice Question: A developer needs to grant a colleague read and…
A developer needs to grant a colleague read and write access to a directory /project, but the colleague should not have permission to delete any files created by the developer. The developer wants to set the directory so that all new files created in it automatically belong to the group 'project' and are writable by group. Which combination of configuration should be used?
⚠ Common exam trap
A common mistake is confusing a regular ACL applied to a directory with a default ACL. A regular ACL affects only the directory itself, not new files. Only default ACLs are inherited by newly created 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
✓
chmod g+s /project && setfacl -m default:g:project:rw /project
It combines the setgid bit (`chmod g+s`) on the directory, which ensures new files inherit the group 'project', with a default ACL (`setfacl -m default:g:project:rw`) that grants read and write permissions to the group on newly created files. This setup gives the colleague (who is a member of the 'project' group) read/write access without delete permission on files owned by the developer, as the colleague cannot delete files they do not own unless the directory's sticky bit is set (which is not configured here).
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
chmod g+s /project && setfacl -m default:g:project:rw /project
Why this is correct
Setgid ensures new files inherit project group; default ACL ensures new files have group rw permissions.
- ✗
chmod 1770 /project && usermod -aG project colleague
Why it's wrong here
Sticky bit prevents deletion of others' files, but does not automatically set group ownership or permissions for new files.
- ✗
chmod g+s /project && setfacl -m g:project:rwx /project
Why it's wrong here
This sets group rwx on the directory, but does not set default ACL for new files, so new files may not inherit group write.
- ✗
chown .project /project && chmod 2775 /project
Why it's wrong here
2775 sets setgid and permissions, but new files may not have group write unless umask and group ownership are correct; no default ACL is set.
Visual reference
Go deeper
Related to this question
Learn chapter
File Permissions and Ownership
Key term
Sticky bit
The sticky bit is a special permission on Unix/Linux files and directories that restricts file deletion to the file owner, directory owner, or root user, even if others have write access.
Key term
setfacl
setfacl is a Linux/Unix command used to set Access Control Lists on files and directories, providing more detailed permission control beyond the standard owner-group-others model.
About these practice questions
One of 979 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 by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.