Courseiva
Manage users and groupshardMultiple ChoiceObjective-mapped

EX200 Manage users and groups Practice Question

You are managing a Red Hat Enterprise Linux 8 server that hosts backup scripts. A user named 'backup' (UID 1005) is a member of the 'backup' group. The directory /var/backups is owned by root:backup with permissions 775. The 'backup' user needs to create files in this directory. However, when the user attempts to create a file, they receive 'Permission denied'. You verify that 'backup' is indeed listed in the backup group in /etc/group. The user's current shell was started after their last login. Which of the following is the most likely cause and solution?

⚠ Common exam trap

A common mix-up: candidates think the setgid bit or umask is the issue, but the real problem is that group membership changes do not apply to existing login sessions—a fundamental Linux behavior that Red Hat EX200 frequently tests.

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

The user needs to log out and log back in to refresh their group membership.

The user 'backup' is already a member of the 'backup' group in /etc/group, but the current shell session was started before the group membership was added or refreshed. On Linux, group membership is determined at login time by the PAM modules; simply adding a user to a group does not affect already running processes. The user must log out and log back in (or start a new login shell) to acquire the new group membership via the initgroups() system call, which populates the process's supplementary group list.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The directory lacks the setgid bit; set it with 'chmod g+s /var/backups'.

    Why it's wrong here

    The setgid bit on a directory only controls the group ownership inherited by newly created files; it does not govern whether a user has permission to create files at all. If the user already has write and execute access on the directory (through user, group, or other bits), they can create entries even without the setgid bit. Because the observed error is 'Permission denied' during creation, the cause must be missing write permission or a security mechanism, not the absence of setgid.

  • The user needs to log out and log back in to refresh their group membership.

    Why this is correct

    Linux determines a user's supplemental groups at login time from the /etc/group database and stores them in the process credentials via initgroups(). When a user is added to a new group after their current login, existing shells and daemons keep the old group set; simply editing /etc/group does not update running sessions. The user must end the session and log in again so that login(1) or systemd user session reinitializes the supplementary groups, allowing access to files and directories that require that group.

  • The user's umask is too restrictive, preventing file creation. Change the umask to 002.

    Why it's wrong here

    The umask is a per-process mask that determines which permission bits are turned off when creating a file or directory; for example, 022 yields 755/644 defaults. It never prevents creation from succeeding—if the process has write permission on the parent directory, the file is created regardless of the umask. A 'Permission denied' on creation is invariably caused by a lack of write/execute permission on the directory, an ACL, SELinux policy, or a read-only mount, not by umask. Changing umask to 002 only affects the default permissions, not whether creation is permitted.

  • The user should use 'newgrp backup' to switch to the backup group temporarily.

    Why it's wrong here

    The user's current shell was started after login, so the backup group membership (listed in /etc/group) is already inherited as a supplementary group. The `Permission denied` therefore stems from a different cause—such as an SELinux context, ACL, or filesystem mount option—not from an absent group. Newgrp changes only the effective primary GID, which does not address this other underlying issue. It is tempting because newgrp is the standard tool when a user lacks the group in their current session (e.g., a group was added after login and they need a temporary switch without logging out).

About these practice questions

This EX200 question is part of Courseiva's 127-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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This EX200 practice question is part of Courseiva's free Red Hat 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 EX200 exam.