Security

A web application on an enforcing server cannot reach a remote PostgreSQL database. The audit log shows an AVC denial for httpd_t, and the httpd_can_network_connect_db boolean is off. The fix must persist across reboots, and SELinux must stay in enforcing mode. Which command should the administrator run?

Show the answer

Correct answerA. setsebool -P httpd_can_network_connect_db on

setsebool -P changes the boolean in the running policy and saves it so it persists across reboots, keeping enforcing mode. Without -P, the change works immediately but is lost at the next reboot.