SELinux frequently used info
Disable/enable on the fly
Either turn it on:
sudo setenforce enforcing
or turn it off:
sudo setenforce permissive
These aren’t permanent changes; next reboot it’ll go back to whatever the config is set to. But this will let you on the fly turn on or off SELinux. I use it if I suspect SELinux to be blocking something.
Change context
Sometimes one has to change context of a file or directory. Doing it recursively for a particular directory is as easy as:
$ sudo chcon -Rv --type=httpd_sys_content_t <directory>
Where httpd_sys_content_t is the “type” of context. Generally that’s all I ever use this for.