CompTIA Linux+ XK0-006 (V8) Practice Question

A web administrator moved a new index.html file into /var/www/html/. After the move, users can no longer access the website, receiving a 'Forbidden' error. The administrator checks the standard file permissions, and they appear to be correct. However, running ls -Z /var/www/html/index.html reveals the file has an incorrect SELinux context of unconfined_u:object_r:user_home_t:s0. Which of the following commands should the administrator use to fix the issue by applying the correct, default SELinux context?

  • chcon -t httpd_sys_content_t /var/www/html/index.html

  • semanage fcontext -a -t httpd_sys_content_t '/var/www/html/index.html'

  • restorecon -v /var/www/html/index.html

  • setenforce 0

CompTIA Linux+ XK0-006 (V8)
Security
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot