Bug 889151
| Summary: | SELinux prevents cron/logrotate from rotating nginx log files | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Jamie Nguyen <jamielinux> |
| Component: | selinux-policy-targeted | Assignee: | Miroslav Grepl <mgrepl> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Ben Levenson <benl> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 18 | CC: | dwalsh |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-02-11 04:56:13 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Associated bug: https://bugzilla.redhat.com/show_bug.cgi?id=888225 Also, as far as I can see, this does not affect Fedora 17. nginx-1.2.6-6.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/nginx-1.2.6-6.fc18 selinux-policy-3.11.1-76.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-76.fc18 Package selinux-policy-3.11.1-76.fc18: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing selinux-policy-3.11.1-76.fc18' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-2101/selinux-policy-3.11.1-76.fc18 then log in and leave karma (feedback). selinux-policy-3.11.1-76.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report. nginx-1.2.6-6.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report. |
Logrotation of nginx log files in /var/log/nginx/*.log is prevented from executing properly by SELinux policy. Once the log files have been rotated, the nginx web server needs to be told to re-open the log files with SIGUSR1. /etc/logrotate.d/nginx contains: postrotate /bin/systemctl kill --signal=SIGUSR1 nginx.service endscript /var/log/audit/audit.log contains: ========== type=USER_AVC msg=audit(1355990461.465:299): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='avc: denied { stop } for auid=0 uid=0 gid=0 path="/usr/lib/systemd/system/nginx.service" cmdline="/bin/systemctl kill --signal=SIGUSR1 nginx.service" scontext=system_u:system_r:logrotate_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_unit_file_t:s0 tclass=service exe="/usr/lib/systemd/systemd" sauid=0 hostname=? addr=? terminal=?' ========== cronie-1.4.10-1 logrotate-3.8.2-1 nginx-1.2.6-3 selinux-policy-3.11.1-66.fc18