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
    


發佈了523 篇原創文章 · 獲贊 15 · 訪問量 190萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章