XK0-006 Security Practice Question
A security audit reveals that an SELinux boolean 'httpd_can_network_connect' is currently off, but a web application requires Apache to connect to a database server. Which command should the administrator use to enable this boolean persistently?
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
✓
setsebool -P httpd_can_network_connect on
setsebool -P makes the change persistent across reboots.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
setenforce 1
Why it's wrong here
setenforce changes the enforcing mode, not booleans.
- ✗
setsebool httpd_can_network_connect 1
Why it's wrong here
Missing -P, so change is temporary.
- ✓
setsebool -P httpd_can_network_connect on
Why this is correct
Correctly sets the boolean persistently.
- ✗
getsebool httpd_can_network_connect
Why it's wrong here
getsebool only shows current value.
Go deeper
Related to this question
About these practice questions
This XK0-006 question is part of Courseiva's 979-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.