Question 280
Following lab verification, document the preventive or persistence-oriented procedure for: An application hosted by Apache needs outbound database connections but SELinux policy denies them even with network routing functional. Which practice is most suitable?
Explanation
Correct Answer
Enable only approved service-specific Booleans and review the resulting access scope. This guards against recurrence of: SELinux Booleans can authorize specific service behavior without disabling the entire MAC policy. Confirm the lab's final state by: `getsebool` reports on after reboot and the documented DB connection test succeeds.
Incorrect Answers
Check runtime and configured SELinux modes after policy changes. That control is best suited to a separate scenario: A training VM must boot with SELinux enforcing but `/etc/selinux/config` is set to permissive. It is not the best safeguard for the current mechanism: SELinux Booleans can authorize specific service behavior without disabling the entire MAC policy.
Persist custom path mapping in SELinux fcontext policy, not one-off `chcon` changes. That control is best suited to a separate scenario: A web service moved to `/srv/custom-web` encounters SELinux denials because content copied from a home directory carries the wrong label. It is not the best safeguard for the current mechanism: SELinux Booleans can authorize specific service behavior without disabling the entire MAC policy.
Set a restrictive umask in service startup or trusted shell policy for secret handling. That control is best suited to a separate scenario: A shell session creates files with default modes exposing group-readable secrets to unrelated users. It is not the best safeguard for the current mechanism: SELinux Booleans can authorize specific service behavior without disabling the entire MAC policy.