Summary: SELinux is preventing /usr/sbin/httpd from using potentially mislabeled files /var/cache. Detailed Description: SELinux has denied the httpd access to potentially mislabeled files /var/cache. This means that SELinux will not allow httpd to use these files. If httpd should be allowed this access to these files you should change the file context to one of the following types, var_lock_t, httpd_var_lib_t, httpd_var_run_t, tmp_t, squirrelmail_spool_t, httpd_log_t, httpd_rw_content, tmpfs_t, httpd_cache_t, httpd_tmpfs_t, var_lib_t, var_run_t, httpdcontent, httpd_tmp_t, httpd_squirrelmail_t, var_log_t, httpd_apcupsd_cgi_content_ra_t, httpd_apcupsd_cgi_content_rw_t, httpd_sys_content_t, httpd_prewikka_content_ra_t, httpd_prewikka_content_rw_t, httpd_awstats_content_ra_t, httpd_awstats_content_rw_t, httpd_w3c_validator_content_ra_t, httpd_w3c_validator_content_rw_t, httpd_user_content_ra_t, httpd_user_content_rw_t, httpdcontent, httpd_munin_content_ra_t, httpd_munin_content_rw_t, root_t, httpd_bugzilla_content_ra_t, httpd_bugzilla_content_rw_t, httpd_nagios_content_ra_t, httpd_nagios_content_rw_t, httpd_sys_content_ra_t, httpd_sys_content_rw_t, httpd_sys_content_rw_t, httpd_cvs_content_ra_t, httpd_cvs_content_rw_t, httpd_git_content_ra_t, httpd_git_content_rw_t, httpd_squid_content_ra_t, httpd_squid_content_rw_t. Many third party apps install html files in directories that SELinux policy cannot predict. These directories have to be labeled with a file context which httpd can access. Allowing Access: If you want to change the file context of /var/cache so that the httpd daemon can access it, you need to execute it using semanage fcontext -a -t FILE_TYPE '/var/cache'. where FILE_TYPE is one of the following: var_lock_t, httpd_var_lib_t, httpd_var_run_t, tmp_t, squirrelmail_spool_t, httpd_log_t, httpd_rw_content, tmpfs_t, httpd_cache_t, httpd_tmpfs_t, var_lib_t, var_run_t, httpdcontent, httpd_tmp_t, httpd_squirrelmail_t, var_log_t, httpd_apcupsd_cgi_content_ra_t, httpd_apcupsd_cgi_content_rw_t, httpd_sys_content_t, httpd_prewikka_content_ra_t, httpd_prewikka_content_rw_t, httpd_awstats_content_ra_t, httpd_awstats_content_rw_t, httpd_w3c_validator_content_ra_t, httpd_w3c_validator_content_rw_t, httpd_user_content_ra_t, httpd_user_content_rw_t, httpdcontent, httpd_munin_content_ra_t, httpd_munin_content_rw_t, root_t, httpd_bugzilla_content_ra_t, httpd_bugzilla_content_rw_t, httpd_nagios_content_ra_t, httpd_nagios_content_rw_t, httpd_sys_content_ra_t, httpd_sys_content_rw_t, httpd_sys_content_rw_t, httpd_cvs_content_ra_t, httpd_cvs_content_rw_t, httpd_git_content_ra_t, httpd_git_content_rw_t, httpd_squid_content_ra_t, httpd_squid_content_rw_t. You can look at the httpd_selinux man page for additional information. Additional Information: Source Context unconfined_u:system_r:httpd_t:s0 Target Context system_u:object_r:var_t:s0 Target Objects /var/cache [ dir ] Source httpd Source Path /usr/sbin/httpd Port <Unknown> Host (removed) Source RPM Packages httpd-2.2.13-4.fc12 Target RPM Packages filesystem-2.4.30-2.fc12 Policy RPM selinux-policy-3.6.32-46.fc12 Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Plugin Name httpd_bad_labels Host Name (removed) Platform Linux (removed) 2.6.31.5-127.fc12.i686 #1 SMP Sat Nov 7 21:41:45 EST 2009 i686 i686 Alert Count 1 First Seen Fri 27 Nov 2009 09:28:45 AM PST Last Seen Fri 27 Nov 2009 09:28:45 AM PST Local ID 19944acb-89e4-47fb-8122-7e98b0b191f3 Line Numbers Raw Audit Messages node=(removed) type=AVC msg=audit(1259342925.182:26722): avc: denied { write } for pid=3348 comm="httpd" name="cache" dev=dm-0 ino=32770 scontext=unconfined_u:system_r:httpd_t:s0 tcontext=system_u:object_r:var_t:s0 tclass=dir node=(removed) type=SYSCALL msg=audit(1259342925.182:26722): arch=40000003 syscall=5 success=no exit=-13 a0=16e37c0 a1=88042 a2=1a4 a3=27 items=0 ppid=3347 pid=3348 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=1 comm="httpd" exe="/usr/sbin/httpd" subj=unconfined_u:system_r:httpd_t:s0 key=(null) Hash String generated from selinux-policy-3.6.32-46.fc12,httpd_bad_labels,httpd,httpd_t,var_t,dir,write audit2allow suggests: #============= httpd_t ============== allow httpd_t var_t:dir write;
Do you know what directory it is trying to create? Did you remove a directory from /var/cache?
This was a fresh install of Fedora 12 32bit. If the directory was created it was either the fresh install or using the add/remove GUI interface. I went ahead and downloaded the apache source and did a configure and make installed. It is running with no problems.
You can add these rules for now using # grep avc /var/log/audit/audit.log | audit2allow -M mypol # semodule -i mypol.pp Fixed in selinux-policy-3.6.32-52.fc12.noarch
selinux-policy-3.6.32-52.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-52.fc12
selinux-policy-3.6.32-52.fc12 has been pushed to the Fedora 12 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update selinux-policy'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2009-12549
selinux-policy-3.6.32-55.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-55.fc12
selinux-policy-3.6.32-55.fc12 has been pushed to the Fedora 12 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update selinux-policy'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2009-12650
selinux-policy-3.6.32-55.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.
selinux-policy-3.6.32-120.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-120.fc12
selinux-policy-3.6.32-120.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.