SELinux policy enabled; httpd running as context unconfined_u:system

CentOS6.0 下默认开selinux时出现httpd 报“SELinux policy enabled; httpd running as context unconfined_u:system”的解决方案
安装audit2allow 参看http://wiki.eri.ucsb.edu/sysadm/SELinux
yum install policycoreutils-python

To allow httpd to use nfs dirs in CentOS-6

setsebool -P httpd_use_nfs 1
setsebool -P httpd_enable_homedirs 1


文章来源: http://www.xinotes.org/notes/note/1156/
Open /var/log/httpd/error_log, you may see a line like this: 

  
  
  
  
[Wed Apr 13 15:50:35 2011] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:httpd_t:s0
These are the steps to fix: 

  
  
  
  
  1. If the directory resides in a user home directory: 
    # setsebool -P httpd_read_user_content 1
    

  2. Create a policy package from the audit log: 
    # grep httpd /var/log/audit/audit.log | audit2allow -M mypol
    ******************** IMPORTANT ***********************
    To make this policy package active, execute:
    
    semodule -i mypol.pp
    

  3. Apply the policy package just created 
    # semodule -i mypol.pp
    

  4. Restart apache httpd: 
    # apachectl restart
    


你可能感兴趣的:(apache,centos,user,System)