XK0-006 System Management Practice Question
A Linux administrator needs to permanently set the system-wide umask to 027 for all users on a production server. The administrator edits /etc/profile and adds the line 'umask 027'. After rebooting, a user logs in and runs 'umask', which returns 0022. Which of the following is the most likely reason the setting did not take effect?
⚠ Common exam trap
The trap here is assuming that editing /etc/profile alone guarantees a system-wide umask, overlooking that per-user shell configuration files are sourced afterward and can override it.
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's shell configuration file, such as ~/.bashrc or ~/.profile, overrides the umask set in /etc/profile.
The umask is set per process and inherited. System-wide defaults in /etc/profile apply to login shells, but user-specific files like ~/.bashrc or ~/.profile are sourced later and can override the umask. Since the user's umask returned 0022, it indicates a user-level configuration is taking precedence. To enforce a system-wide umask, administrators must ensure user files do not override it or use mechanisms like pam_umask.
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 user's shell configuration file, such as ~/.bashrc or ~/.profile, overrides the umask set in /etc/profile.
Why this is correct
User-specific shell initialization files like ~/.bashrc or ~/.profile are sourced after /etc/profile and can override the umask. If the user's file contains a umask command, it will take precedence. This is the most common reason a system-wide umask in /etc/profile appears ineffective, as the user's environment resets the value during login.
- ✗
The umask command must be run with sudo to affect all users.
Why it's wrong here
Running umask with sudo would only change the umask for the root shell or the specific command, not globally for all users. Umask is a per-process attribute inherited by child processes; it is not a privileged setting. The issue is not permissions but configuration precedence, so using sudo would not resolve the problem and could introduce security risks.
- ✗
The umask value must be set in /etc/login.defs to apply system-wide.
Why it's wrong here
/etc/login.defs is used by login programs like login and su to set initial umask for new sessions, but it does not override user shell configuration files. Setting umask there would affect the initial umask, but if a user's shell profile changes it later, the final umask will still be altered. Thus, it is not the direct cause of the observed override.
- ✗
The system needs to be rebooted for changes to /etc/profile to take effect.
Why it's wrong here
Changes to /etc/profile take effect for new login sessions without requiring a reboot. The administrator already rebooted, and the user logged in afterward, so the file was read. The problem is not that the change requires a reboot but that another configuration file supersedes it. Rebooting again would not change the outcome.
Go deeper
Related to this question
Learn chapter
Networking Fundamentals and Configuration
Key term
Linux
Linux is an open-source operating system that manages computer hardware and software, widely used in servers, desktops, and embedded systems.
Key term
Process
In IT service management, a process is a structured set of activities designed to accomplish a specific objective, such as managing incidents or changes, by transforming inputs into defined outputs.
About these practice questions
One of 781 original XK0-006 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 and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official CompTIA exam blueprint
This XK0-006 practice question is part of Courseiva's free CompTIA 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 XK0-006 exam.