Courseiva
hardMultiple ChoiceObjective-mapped

XK0-006 Practice Question: Based on the exhibit, which file has an incorrect…

Network Topology
-rw-rrRefer to the exhibit.~]$ ls -lZ /var/www/html

Based on the exhibit, which file has an incorrect SELinux context for serving web content via Apache?

⚠ Common exam trap

CompTIA Linux+ often tests the distinction between file permissions (DAC) and SELinux contexts (MAC), where candidates assume that correct ownership and permissions (e.g., 644, owned by apache) are sufficient, overlooking that SELinux must also allow the httpd process to access the file via the correct context type.

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

index.html

(index.html) because the exhibit shows that index.html has the SELinux context type 'user_home_t', which is not accessible by Apache's httpd process. Apache requires files served via HTTP to have the 'httpd_sys_content_t' context type (or 'httpd_sys_rw_content_t' for writable content) to be readable by the httpd daemon. Without this context, SELinux will block Apache from serving the file, even if file permissions and ownership are correct.

Answer analysis

Option-by-option breakdown

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

  • Neither

    Why it's wrong here

    At least one file has an incorrect context.

  • style.css

    Why it's wrong here

    style.css has the correct context httpd_sys_content_t.

  • Both

    Why it's wrong here

    Only index.html is incorrect.

  • index.html

    Why this is correct

    index.html has context user_home_t, which prevents Apache from serving it; the correct context is httpd_sys_content_t.

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 →

How Courseiva writes practice questions · Editorial policy

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.