- A
Add John to the 'webgroup' supplementary group with 'usermod -a -G webgroup john'.
Correct: John gains the group permissions of webgroup, allowing read/write access to the directory, while his primary group remains 'staff'.
- B
Change the group ownership of /var/www/html to 'staff' and set the setgid bit.
Why wrong: Incorrect: This would grant access to all staff members, which is too permissive.
- C
Change John's primary group to 'webgroup' with 'usermod -g webgroup john'.
Why wrong: Incorrect: This changes his primary group, which may affect file creation in other directories.
- D
Set the setgid bit on /var/www/html with 'chmod g+s /var/www/html'.
Why wrong: Incorrect: The setgid bit only affects new files; John still needs group membership to access existing files.
Quick Answer
The answer is to add John to the 'webgroup' supplementary group using `usermod -a -G webgroup john`. This is correct because Linux file permissions are evaluated against both the user's primary group and any supplementary groups they belong to; since /var/www/html has group ownership of webgroup with 775 permissions, adding John as a supplementary member grants him read and write access without altering his primary group of 'staff'. On the LFCS exam, this scenario tests your understanding of the difference between primary and supplementary groups, a common trap being that candidates mistakenly change the primary group with `usermod -g` or use `chown`, which would violate the security policy. The key insight is that `-a -G` appends to existing supplementary groups, while `-g` changes the primary group—a distinction the exam loves to probe. Remember the mnemonic: "Append with -a, never change the primary with -g."
LFCS User and Group Management Practice Question
This LFCS practice question tests your understanding of user and group management. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
Scenario: You are managing a Linux server that hosts a web application. The application runs under the user 'webapp' and the group 'webgroup'. Recently, a new intern 'john' (username 'john') needs to be able to view and modify files in /var/www/html, which is owned by root:webgroup with permissions 775. John is currently a member of the group 'staff', but not 'webgroup'. The security policy requires that John must be able to edit files without using sudo, and his primary group must remain 'staff'. Which of the following actions should you take to meet the requirements?
Clue words in this question
Noticing these words before you look at the options changes how you read each choice.
Clue:
"primary"Why it matters: Asks for the main purpose or function, not a secondary benefit. Eliminate answers that describe side-effects or partial functions.
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
Add John to the 'webgroup' supplementary group with 'usermod -a -G webgroup john'.
Option A is correct because adding John to the 'webgroup' supplementary group with `usermod -a -G webgroup john` grants him group-level access to /var/www/html (owned by root:webgroup with permissions 775) without changing his primary group 'staff'. This allows him to view and modify files as a member of 'webgroup', satisfying the security policy that he must not use sudo and his primary group must remain unchanged.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Add John to the 'webgroup' supplementary group with 'usermod -a -G webgroup john'.
Why this is correct
Correct: John gains the group permissions of webgroup, allowing read/write access to the directory, while his primary group remains 'staff'.
Clue confirmation
The clue word "primary" in the question point toward this answer.
Related concept
Read the scenario before looking for a memorised answer.
- ✗
Change the group ownership of /var/www/html to 'staff' and set the setgid bit.
Why it's wrong here
Incorrect: This would grant access to all staff members, which is too permissive.
- ✗
Change John's primary group to 'webgroup' with 'usermod -g webgroup john'.
Why it's wrong here
Incorrect: This changes his primary group, which may affect file creation in other directories.
- ✗
Set the setgid bit on /var/www/html with 'chmod g+s /var/www/html'.
Why it's wrong here
Incorrect: The setgid bit only affects new files; John still needs group membership to access existing files.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates may confuse the setgid bit (Option D) with granting group membership, or incorrectly assume that changing the primary group (Option C) is acceptable despite the explicit requirement to keep it as 'staff'.
Detailed technical explanation
How to think about this question
The `usermod -a -G` command appends a user to a supplementary group without affecting their primary group, leveraging the `/etc/group` file to store supplementary group memberships. The permissions 775 on /var/www/html mean the owner (root) has rwx, the group (webgroup) has rwx, and others have r-x; thus, group membership is the key to write access. In real-world scenarios, supplementary groups are commonly used to grant granular access to shared resources (e.g., web directories, shared project folders) while preserving the user's primary group for login or file creation defaults.
KKey Concepts to Remember
- Read the scenario before looking for a memorised answer.
- Find the constraint that changes the correct option.
- Eliminate answers that are true in general but not in this case.
TExam Day Tips
- Watch for words such as best, first, most likely and least administrative effort.
- Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A practitioner preparing for the LFCS exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.
What to study next
Got this wrong? Here's your next step.
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
- →
User and Group Management — study guide chapter
Learn the concepts, then practise the questions
- →
User and Group Management practice questions
Targeted practice on this topic area only
- →
All LFCS questions
513 questions across all exam domains
- →
Linux Foundation Certified System Administrator LFCS study guide
Full concept coverage aligned to exam objectives
- →
LFCS practice test guide
How to use practice tests most effectively before exam day
Related practice questions
Related LFCS practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
User and Group Management practice questions
Practise LFCS questions linked to User and Group Management.
Operation of Running Systems practice questions
Practise LFCS questions linked to Operation of Running Systems.
Essential Commands practice questions
Practise LFCS questions linked to Essential Commands.
Networking practice questions
Practise LFCS questions linked to Networking.
Service Configuration practice questions
Practise LFCS questions linked to Service Configuration.
Storage Management practice questions
Practise LFCS questions linked to Storage Management.
LFCS fundamentals practice questions
Practise LFCS questions linked to LFCS fundamentals.
LFCS scenario practice questions
Practise LFCS questions linked to LFCS scenario.
LFCS troubleshooting practice questions
Practise LFCS questions linked to LFCS troubleshooting.
Practice this exam
Start a free LFCS practice session
Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.
FAQ
Questions learners often ask
What does this LFCS question test?
User and Group Management — This question tests User and Group Management — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: Add John to the 'webgroup' supplementary group with 'usermod -a -G webgroup john'. — Option A is correct because adding John to the 'webgroup' supplementary group with `usermod -a -G webgroup john` grants him group-level access to /var/www/html (owned by root:webgroup with permissions 775) without changing his primary group 'staff'. This allows him to view and modify files as a member of 'webgroup', satisfying the security policy that he must not use sudo and his primary group must remain unchanged.
What should I do if I get this LFCS question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Are there clue words in this question I should notice?
Yes — watch for: "primary". Asks for the main purpose or function, not a secondary benefit. Eliminate answers that describe side-effects or partial functions.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Last reviewed: Jun 11, 2026
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.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.