selinux 防火牆

chcon -u system_u -t httpd_sys_content_t /var/www/html

After reboot will set to follow:

vi /etc/sysconfig/selinux

# enforcing – SELinux security policy is enforced.

# permissive – SELinux prints warnings instead of enforcing.

# disabled – SELinux is fully disabled.

Reboot before:

setenforce 0

0=Permissive

1=Enforcing

getenforce

getsebool -a

setsebool

setsebool這個指令,加-P的意思是永久性的關閉,沒有加這個參數就表示只是暫時關閉,當重開機之後即恢復SELINUX的管控。

view the selinux log file

cat /var/log/messages

sealert -l [alert ID]