XK0-006 System Management Practice Question
A Linux administrator is configuring file permissions for a shared directory used by a development team. The administrator wants to ensure that any new files created in the directory inherit the group ownership of the directory and that the group has read and write permissions on those files. Which TWO actions should the administrator take? (Choose TWO.)
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
✓
Use the command 'chmod g+s /shared' to set the SGID bit on the directory.
Setting the SGID bit (chmod g+s) on the directory ensures new files inherit the group ownership. Using an ACL with default entries (setfacl -d) can set default permissions for new files.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Use the command 'chmod g+s /shared' to set the SGID bit on the directory.
Why this is correct
SGID on a directory causes new files to inherit the directory's group.
- ✗
Use the command 'setfacl -m g:devteam:rw /shared' to set an ACL on the directory.
Why it's wrong here
This sets an ACL for the group on the directory itself, but does not affect new files; default ACLs are needed.
- ✗
Use the command 'chmod 2770 /shared' to set permissions with SGID and full access for owner and group.
Why it's wrong here
While this sets SGID, it also sets permissions directly, but does not guarantee new files inherit group read/write unless ACLs are used with default entries.
- ✗
Use the command 'umask 0007' to set the umask for the directory.
Why it's wrong here
umask affects the file creation mask of the shell, not the directory; it would need to be set in the environment, but is not a directory attribute.
- ✓
Use the command 'setfacl -d -m g:devteam:rw /shared' to set a default ACL on the directory.
Why this is correct
Default ACLs are inherited by new files and directories.
Visual reference
Go deeper
Related to this question
Learn chapter
Linux Fundamentals and History
Key term
Linux
Linux is an open-source operating system that manages computer hardware and software, widely used in servers, desktops, and embedded systems.
Key term
SGID
SGID stands for Set Group ID, a Unix/Linux file permission that allows a process or executable to run with the group privileges of the file's group owner, not the user who runs it.
About these practice questions
This XK0-006 question is part of Courseiva's 979-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.