Show Table of Contents
5.5.2. Configuring Booleans
Run the
setsebool utility in the setsebool boolean_name on/off form to enable or disable Booleans.
The following example demonstrates configuring the
httpd_can_network_connect_db Boolean:
- By default, the
httpd_can_network_connect_dbBoolean is off, preventing Apache HTTP Server scripts and modules from connecting to database servers:~]$
getsebool httpd_can_network_connect_dbhttpd_can_network_connect_db --> off - To temporarily enable Apache HTTP Server scripts and modules to connect to database servers, run the
setsebool httpd_can_network_connect_db oncommand as the Linux root user. - Use the
getsebool httpd_can_network_connect_dbcommand to verify the Boolean is enabled:~]$
getsebool httpd_can_network_connect_dbhttpd_can_network_connect_db --> onThis allows Apache HTTP Server scripts and modules to connect to database servers. - This change is not persistent across reboots. To make changes persistent across reboots, run the
setsebool -P boolean-name oncommand as the Linux root user:[7]~]#
setsebool -P httpd_can_network_connect_db on
[7]
To temporarily revert to the default behavior, as the Linux root user, run the
setsebool httpd_can_network_connect_db off command. For changes that persist across reboots, run the setsebool -P httpd_can_network_connect_db off command.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.