XK0-006 Security Practice Question
An AppArmor profile for a web server is in complain mode. After testing, the administrator wants to enforce the profile. Which command accomplishes this?
⚠ Common exam trap
It's easy for candidates to confuse `apparmor_parser -r` (which reloads the profile but does not change its mode) with the mode-switching commands `aa-enforce` and `aa-complain`, leading them to choose option A incorrectly.
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
✓
aa-enforce /etc/apparmor.d/usr.sbin.httpd
The correct command to enforce an AppArmor profile that is currently in complain mode is `aa-enforce`. This command switches the profile from complain (log-only) to enforce (block violations) mode. The option `-r` in `apparmor_parser` reloads the profile but does not change its mode; `aa-complain` sets it to complain mode, and `aa-status` only displays status.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
apparmor_parser -r /etc/apparmor.d/usr.sbin.httpd
Why it's wrong here
Reloads profile but does not change mode.
- ✓
aa-enforce /etc/apparmor.d/usr.sbin.httpd
Why this is correct
Correct command.
- ✗
aa-complain /etc/apparmor.d/usr.sbin.httpd
Why it's wrong here
aa-complain sets to complain mode.
- ✗
aa-status /etc/apparmor.d/usr.sbin.httpd
Why it's wrong here
aa-status shows status, does not change mode.
Go deeper
Related to this question
About these practice questions
Courseiva writes every XK0-006 question from scratch — 979 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.