LFCS Essential Commands Practice Question
An administrator needs to change the group ownership of the directory /srv/project and all of its existing contents to the group developers, without altering the user ownership. Which command should be used?
⚠ Common exam trap
The trap here is assuming chown with a single name sets the group, when it actually sets the user owner.
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 -R developers /srv/project
Changing group ownership recursively is the job of chgrp -R. It applies only the group change and leaves user ownership intact, which is precisely what the scenario requires. chown with a bare name targets the user, chmod alters permissions rather than ownership, and usermod operates on account definitions instead of filesystem objects.
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 -R g+developers /srv/project
Why it's wrong here
chmod modifies permission bits, not ownership, and the syntax g+developers is invalid because chmod expects permission symbols such as r, w, or x after the class selector. This command would produce an error and cannot change which group owns the files.
- ✗
usermod -g developers /srv/project
Why it's wrong here
usermod manages user account attributes, not file ownership, and it expects a username rather than a path. Passing a directory path would cause an error and could not affect the group ownership of files under /srv/project, making it entirely unsuitable for this task.
- ✗
chown -R developers /srv/project
Why it's wrong here
When chown is given a single name without a colon, it is interpreted as a user name, not a group. This command would attempt to change the user owner to developers, which does not exist as a user, and it would fail or behave incorrectly, so it does not change group ownership as required.
- ✓
chgrp -R developers /srv/project
Why this is correct
chgrp changes group ownership and the -R flag applies the change recursively to the directory and all existing contents. It leaves user ownership untouched, which matches the requirement exactly, and it is the purpose-built command for changing group ownership on Linux systems.
Go deeper
Related to this question
About these practice questions
Courseiva writes every LFCS question from scratch — 406 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. 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 Linux Foundation exam blueprint
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.