Description of problem: openstack-dashboard uses /var/log/horizon for log files. policy apparently denies to access that: type=AVC msg=audit(1412836262.715:4454): avc: denied { open } for pid=6445 comm="httpd" path="/var/log/horizon/horizon.log" dev="dm-1" ino=4194308 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file permissive=0 type=AVC msg=audit(1412836360.505:4767): avc: denied { open } for pid=6458 comm="httpd" path="/var/log/horizon/horizon.log" dev="dm-1" ino=4194308 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file permissive=0 type=AVC msg=audit(1412836528.320:5317): avc: denied { open } for pid=6467 comm="httpd" path="/var/log/horizon/horizon.log" dev="dm-1" ino=4194308 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file permissive=1 type=AVC msg=audit(1412837235.000:1929): avc: denied { open } for pid=1902 comm="httpd" path="/var/log/horizon/horizon.log" dev="dm-1" ino=4194308 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file permissive=0 type=AVC msg=audit(1412837236.640:1936): avc: denied { open } for pid=2127 comm="httpd" path="/var/log/horizon/horizon.log" dev="dm-1" ino=4194308 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file permissive=0 ls -lZa /var/log/horizon/ drwxr-x---. apache apache system_u:object_r:var_log_t:s0 . drwxr-xr-x. root root system_u:object_r:var_log_t:s0 .. -rw-r-----. apache apache system_u:object_r:var_log_t:s0 horizon.log -rw-r--r--. apache apache system_u:object_r:var_log_t:s0 horizon.log.1 selinux-policy-3.12.1-188.fc20.noarch
restorecon -R -v /var/log/horizon This is a mislabeled directory.
We have issues with this. Matthias, do you know how /var/log/horizon/horizon.log was placed?
Miroslav, it was created by openstack-packstack. Lucas, is there a way to prevent this kind of issue? If I understood your comment correctly, openstack-puppet-modules builds own selinux policies etc? In that case, this would be an issue with o-p-m and not with selinux-policy.
*** Bug 1156148 has been marked as a duplicate of this bug. ***
This is o-p-m issue.
I'm pretty sure SELinux allows httpd to write to horizon log now so this can be closed?