Yeah, selinux can be cryptic for sure! But you can get it going and keep selinux enforcing. The RedHat documentation is your best bet.
To be sure that selinux is the problem you can set selinux to permissive and test. If it works in permissive mode, you know it's selinux protecting you. Here are some commands I use:
- sestatus to see if SELinux is enabled and what mode.
- sudo setenforce 0 to set SELinux to permissive.
- sudo setenforce 1 to set SELInux to enforcing
- getenforce to see if it's enforcing
To help troubleshooting you can use journalctl -t setroubleshoot, or just view the audit log directly in /var/log/audit/audit.log
If you have setroubleshoot installed, it will insert helpful messages into the journal... they even give you commands to run so that you can allow the actions SElinux previously denied.
For example:
If you believe that (krusty-program) should be allowed read_thing access on the krusty-home directory by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c '(krusty-program)' --raw | audit2allow -M my-krusty-program
# semodule -X 300 -i my-krusty-program.pp