SELinux is preventing /usr/sbin/httpd from 'open' accesses on the file /var/log/roundcubemail/sendmail. ***** Plugin catchall (100. confidence) suggests *************************** If you believe that httpd should be allowed open access on the sendmail file 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: # grep httpd /var/log/audit/audit.log | audit2allow -M mypol # semodule -i mypol.pp Additional Information: Source Context system_u:system_r:httpd_t:s0 Target Context system_u:object_r:var_log_t:s0 Target Objects /var/log/roundcubemail/sendmail [ file ] Source httpd Source Path /usr/sbin/httpd Port <Unknown> Host (removed) Source RPM Packages httpd-2.2.17-10.fc15.1 Target RPM Packages Policy RPM selinux-policy-3.9.16-24.fc15 Selinux Enabled True Policy Type targeted Enforcing Mode Permissive Host Name (removed) Platform Linux (removed) 2.6.38.6-27.fc15.x86_64 #1 SMP Sun May 15 17:23:28 UTC 2011 x86_64 x86_64 Alert Count 1 First Seen Tue 31 May 2011 09:30:08 AM CEST Last Seen Tue 31 May 2011 09:30:08 AM CEST Local ID 39ef9a3c-1af3-4ccc-9720-ca56182f9feb Raw Audit Messages type=AVC msg=audit(1306827008.423:14928): avc: denied { open } for pid=5245 comm="httpd" name="sendmail" dev=sdb1 ino=133571 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file type=SYSCALL msg=audit(1306827008.423:14928): arch=x86_64 syscall=open success=yes exit=ENOTBLK a0=7f99e67516a0 a1=441 a2=1b6 a3=676f6c2f7261762f items=0 ppid=1447 pid=5245 auid=4294967295 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=4294967295 comm=httpd exe=/usr/sbin/httpd subj=system_u:system_r:httpd_t:s0 key=(null) Hash: httpd,httpd_t,var_log_t,file,open audit2allow #============= httpd_t ============== allow httpd_t var_log_t:file open; audit2allow -R #============= httpd_t ============== allow httpd_t var_log_t:file open;
could you try: chcon -R -t httpd_log_t /var/log/roundcubemail/ and see where that gets you?
with this context, there is no selinux denial
I gather the webapp able to actually log there as well. Did you try that out?
Label /var/log/roundcubemail type httpd_log_t: http://git.fedorahosted.org/git/?p=selinux-policy.git;a=commitdiff;h=1032b49d90f7e07d18e12a0c189f4c12cb262f07
I do not completely understand you comment. Anyway, I have selinux in permissive mode, so it does not prevent logging. After changing context, messages are still being logged and there is no denial, so it works
Michal, keep the label and see if you get a new issue related to this label. And btw. switch to enforcing mode.
Fixed in selinux-policy-3.9.16-31.fc15
selinux-policy-3.9.16-31.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-31.fc15
Package selinux-policy-3.9.16-32.fc15: * should fix your issue, * was pushed to the Fedora 15 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.9.16-32.fc15' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-32.fc15 then log in and leave karma (feedback).
selinux-policy-3.9.16-32.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report.