LFCS User and Group Management Practice Question
A team of developers must share files under /opt/project. All developers are members of the 'devteam' group. New files must be automatically assigned to group 'devteam' and be writable by the group. Which umask and setgid configuration should be applied?
⚠ Common exam trap
Candidates often make two mistakes regarding this question. First, they may think setting the setgid bit is sufficient without adjusting the umask; but without umask 002, the default 022 strips group write. Second, some may select umask 007 thinking it denies group write, but in reality umask 007 grants group write (660/770) while denying others, which is more restrictive than needed. The correct umask is 002.
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
✓
Set setgid bit on /opt/project and set umask for developers to 002
Setting the setgid bit on /opt/project ensures that new files inherit the group ownership of the directory (devteam), and setting the umask to 002 removes write permission for others but preserves group write permission, so new files are group-writable. This combination meets both requirements automatically without manual intervention.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Set setgid bit on /opt/project and set umask to 007
Why it's wrong here
This option sets the setgid bit correctly but uses umask 007. With umask 007, new files get permissions 660 and directories 770, which do include group write. However, it also removes all permissions for others (---). While this meets the requirement for group write, it is more restrictive than necessary. The key misconception is that umask 007 denies group write—it does not. The standard solution is umask 002 to allow others read/execute permissions.
- ✗
Set the sticky bit on /opt/project and umask to 022
Why it's wrong here
Sticky bit affects deletion, not group inheritance; umask 022 gives group read only.
- ✗
Set umask for developers to 002 only
Why it's wrong here
Without setgid, new files may be owned by the user's primary group, not 'devteam'.
- ✓
Set setgid bit on /opt/project and set umask for developers to 002
Why this is correct
Setgid ensures group ownership inheritance; umask 002 ensures group write.
Go deeper
Related to this question
About these practice questions
One of 507 original LFCS 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 LFCS practice question is part of Courseiva's free Linux Foundation 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 LFCS exam.