Troubleshooting
An administrator moves a site directory from /home/dev/site to /srv/web with mv. Apache, running on an SELinux-enforcing server, now returns 403 Forbidden for every page. Standard permissions and ownership are correct, the pages load after setenforce 0, and ausearch -m avc shows denials involving the user_home_t type. What is the BEST fix?
Show the answer
Correct answerD. Add a file context rule for /srv/web with semanage fcontext, then apply it with restorecon -R
mv keeps the old user_home_t label, so the files need the httpd_sys_content_t type. A persistent semanage fcontext rule plus restorecon applies it. The httpd_enable_homedirs boolean only permits access to home directories, which does not help because the files are no longer there.