SELinux Boolean Seemingly Random Reset

Posted October 28, 2020 515 views
CentOSCentOS 8

Hey all,

I’ve been working on a droplet developing a small WordPress site on CentOS 8. Early on in development, I set the SELinux boolean httpd_can_network_connect to true as I was experiencing problems updating themes and plugins and all was fine. I haven’t logged in in around 3 weeks or so, but when I did today I noticed the same issues I was experiencing before I set the SELinux boolean and some errors in the WordPress site health menu. After investigating, I noticed the boolean somehow got set back to false. I used sudo setsebool -P httpd_can_network_connect true once again and everything went back to normal. Can anyone tell me when might have caused an SELinux boolean to reset, despite me not signing in/working on anything?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

I have never met the situation like that. Did you set this boolean up permanently (with -P parameter) when you did it for the first time ? Search for a related command in bash history file:

grep -e httpd_ ~/.bash_history

If not, then following system reboot restored the previous value.