CompTIA Server+ SK0-005 Practice Question

A CentOS file server also hosts an internal web application from /var/www/html. A junior administrator recently copied user-supplied files into that directory with the command cp -a /home/upload/*.pdf /var/www/html/. Immediately afterward, the application began returning HTTP 403 Forbidden when those PDFs are requested. The Apache error log shows "Permission denied," and /var/log/audit/audit.log contains AVC messages in which httpd_t is denied read access to objects labeled user_home_t. No traditional POSIX permissions were changed.

Which action should you take first to restore user access while keeping SELinux protections in place?

  • Temporarily disable SELinux enforcement with setenforce 0, verify access, and re-enable it after testing.

  • Add Require all granted to the Apache virtual-host configuration and reload the httpd service.

  • Recursively change ownership of the files to apache:apache and set permissions to 755.

  • Run restorecon -R /var/www/html to reset the files and directories to their default SELinux contexts.

CompTIA Server+ SK0-005
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.

SAVE $47
$390.00 $343.00
SAVE $53
CompTIA Server+ Voucher with Retake
v5 / SK0-005
Includes Retake
$439.00 $386.00
Bash, the Crucial Exams Chat Bot
AI Bot