When SELinux is enforcing and manage_selinux => true:
apache returns "Permission denied".
ausearch -m avc -i -ts recent shows AVC errors Permission denied error from Puppetboard on the files /srv/puppetboard/puppetboard/settings.py and /srv/puppetboard/puppetboard/wsgi.py
Manually running chcon -t httpd_sys_script_exec_t /srv/puppetboard/puppetboard/settings.py /srv/puppetboard/puppetboard/wsgi.py fixes the issue until Puppet runs again.
What behaviour did you expect instead
The puppetboard module's classes should set all required SELinux contexts when manage_selinux => true
Output log
Any additional information you'd like to impart
I don't know if the httpd_sys_script_exec_t context is universal; perhaps there should be some way to specify the SELinux context for these files.
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
What are you seeing
When SELinux is
enforcing
andmanage_selinux => true
:ausearch -m avc -i -ts recent
shows AVC errors Permission denied error from Puppetboard on the files/srv/puppetboard/puppetboard/settings.py
and/srv/puppetboard/puppetboard/wsgi.py
Manually running
chcon -t httpd_sys_script_exec_t /srv/puppetboard/puppetboard/settings.py /srv/puppetboard/puppetboard/wsgi.py
fixes the issue until Puppet runs again.What behaviour did you expect instead
The puppetboard module's classes should set all required SELinux contexts when
manage_selinux => true
Output log
Any additional information you'd like to impart
I don't know if the
httpd_sys_script_exec_t
context is universal; perhaps there should be some way to specify the SELinux context for these files.