CompTIA Linux+ XK0-006 (V8) Practice Question

A systems administrator on a CentOS server recently moved a new index.html file from their home directory to /var/www/html/. When users browse to the site, they receive a "403 Forbidden" error. The administrator verifies that standard file permissions are rw-r--r-- and ownership is correct for the web server process. An ls -Z command reveals the file has an SELinux context of unconfined_u:object_r:user_home_t:s0. Which of the following commands is the BEST method to resolve this issue?

  • restorecon -Rv /var/www/html

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

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

  • setenforce 0

CompTIA Linux+ XK0-006 (V8)
Troubleshooting
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