mediumMultiple Choice
XK0-006 Practice Question: That a custom application service fails to start…
A user reports that a custom application service fails to start with a 'Permission denied' error in the logs. The service runs under the 'appuser' account. Which is the most likely cause and the first step to diagnose?
⚠ Common exam trap
The Linux+ exam often tests the distinction between standard Linux file permissions (chmod) and SELinux mandatory access controls, trapping candidates who immediately assume a 'Permission denied' error is due to missing execute bits rather than checking SELinux denials in journalctl.
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
✓
SELinux is blocking the service; check journalctl for AVC denials and use restorecon or setsebool.
SELinux enforces mandatory access controls that can block a service from starting even when standard Linux file permissions are correct. The 'Permission denied' error, combined with the service running under a non-root user, strongly suggests SELinux is denying access. Checking journalctl for AVC denials is the standard first diagnostic step to confirm SELinux involvement, followed by using restorecon to fix file context labels or setsebool to adjust SELinux booleans.
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 root password is incorrect; change root password with passwd.
Why it's wrong here
The root account is unrelated to a service running as appuser, so its password cannot produce a 'Permission denied' failure; systemd starts units without authenticating as root interactively. Resetting the root password is the correct action only when administrative login itself is locked out.
- ✓
SELinux is blocking the service; check journalctl for AVC denials and use restorecon or setsebool.
Why this is correct
SELinux confines processes by type enforcement, so a service binary or its files carrying the wrong security context triggers 'Permission denied' even when standard Unix permissions look correct. Checking journalctl for AVC denials confirms the block, then restorecon fixes mislabelled files or setsebool adjusts the relevant boolean.
- ✗
The service binary does not have execute permission for appuser; use chmod +x.
Why it's wrong here
Execute permission on the binary is one possible cause, but the stem asks for the most likely cause and first diagnostic step; chmod +x presumes the fault before inspecting ownership, SELinux context or unit file. It would be correct once audit logs confirm the binary itself lacks the execute bit for appuser.
- ✗
The systemd target is not set to multi-user; run systemctl set-default multi-user.target.
Why it's wrong here
A 'Permission denied' error on service start stems from filesystem or capability restrictions on the appuser account, not the boot target; multi-user.target only governs which units start at boot, and the service is already attempting to run. Setting the default target would be right when a service must not launch in graphical or rescue mode.
Quick reference
Access Control Model Comparison
| Model | Acronym | Who Controls Access? | Best For |
|---|---|---|---|
| Discretionary Access Control | DAC | Resource owner | Small teams, file shares |
| Mandatory Access Control | MAC | System / security labels | Classified govt / military |
| Role-Based Access Control | RBAC | Administrator (via roles) | Enterprise environments |
| Attribute-Based Access Control | ABAC | Policy engine (user + resource attributes) | Fine-grained, dynamic policies |
| Rule-Based Access Control | RuBAC | System rules / ACLs | Firewall rules, network ACLs |
Go deeper
Related to this question
Learn chapter
File Transfer and Remote Access
Key term
Service
A service is a software component or system that performs a specific function and is available to be used by other programs or users over a network.
Key term
Linux
Linux is an open-source operating system that manages computer hardware and software, widely used in servers, desktops, and embedded systems.
About these practice questions
This XK0-006 question is part of Courseiva's 781-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 →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.