page counter next up previous contents
Next: RPM 套件下載安裝 Up: SELinux Previous: 自訂 SELinux 政策二   Contents

自訂 SELinux 政策三

  1. 清除 audit 紀錄。
    [root@ip180 ~]# echo '' > /var/log/audit/audit.log
    
  2. 打開網頁執行網頁,還是被 SELinux 限制。
     <run the sudo from web>
    sudo: unable to send audit message: Permission denied
    
  3. 查看 audit 已允許 httpd_sys_script_t
    [root@ip180 ~]# audit2allow -a
    
    
    #============= httpd_sys_script_t ==============
    
    #!!!! This avc is allowed in the current policy
    allow httpd_sys_script_t admin_home_t:dir getattr;
    
  4. 若加入自訂允許政策模組後,還是無法正常工作,可開放 httpd_sys_script_t 為 permissive。
    [root@ip180 ~]# semanage permissive -a httpd_sys_script_t
    


2015-04-13