發新話題
打印

SELinux and httpd

SELinux and httpd

SELinux 對 httpd 預設的一些 Types:
httpd_sys_content_t
httpd_sys_script_exec_t
httpd_sys_script_ro_t
httpd_sys_script_rw_t
httpd_sys_script_ra_t
httpd_unconfined_script_exec_t
httpd_user_script_exec_t
跟 httpd 相關的一些 booleans 的設定:
允許執行 cgi:
複製內容到剪貼板
代碼:
setsebool -P httpd_enable_cgi 1
允許存取使用者的 $HOME 目錄:
複製內容到剪貼板
代碼:
setsebool -P httpd_enable_homedirs 1
chcon -R -t httpd_sys_content_t ~user/public_html
允許存取 the controling terminal
複製內容到剪貼板
代碼:
setsebool -P httpd_tty_comm 1
不區分 file controls based on context, 設成 0 時 one httpd service can not interfere with another
複製內容到剪貼板
代碼:
setsebool -P httpd_unified 0
關掉 internel scripting (PHP),這樣 php 就無法運作了
複製內容到剪貼板
代碼:
setsebool -P httpd_builtin_scripting 0
允許 httpd scripts 連到外面的網路
複製內容到剪貼板
代碼:
setsebool -P httpd_can_network_connect 1
停用 suexec transition
複製內容到剪貼板
代碼:
setsebool -P httpd_suexec_disable_trans 1
停用 SELinux 對 httpd daemon 的保護
複製內容到剪貼板
代碼:
setsebool -P httpd_disable_trans 1

TOP

發新話題