Dealing with SELinux. The easy way.

So, your newly configured service doesn’t work properly whenever you have SELinux enabled… Instead of just disabling it, try one of the proper ways to fix it:

setenforce permissive

– Reproduce your problem so fresh logs are generated.

grep denied /var/log/audit/audit.log > /tmp/denied_stuff.log

– Check and confirm the content of the log.

cat /tmp/denied_stuff.log | audit2allow -M service_please_do_this

– Check and confirm the policies in the file “service_please_do_this.te”

semodule -i service_please_do_this.pp
setenforce enforcing