Bird
0
0

Why does chgrp require the target group to exist before changing a file's group ownership?

hard📝 Conceptual Q10 of 15
Linux CLI - File Permissions and Ownership
Why does chgrp require the target group to exist before changing a file's group ownership?
ABecause chgrp creates the group if it does not exist
BBecause chgrp changes user ownership, not group
CBecause files can have any arbitrary group name without system groups
DBecause group ownership links to an existing group ID in the system
Step-by-Step Solution
Solution:
  1. Step 1: Understand group ownership in Linux

    Group ownership is stored as a group ID (GID) linked to an existing group in the system.
  2. Step 2: Explain why group must exist

    If the group does not exist, the system cannot assign a valid GID, so chgrp fails.
  3. Final Answer:

    Because group ownership links to an existing group ID in the system -> Option D
  4. Quick Check:

    Group must exist as system GID for chgrp [OK]
Quick Trick: Group must exist as system ID for chgrp to work [OK]
Common Mistakes:
  • Thinking chgrp creates groups
  • Believing files can have arbitrary group names
  • Confusing group with user ownership

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes