SELinux 기초

Security-Enhanced Linux는 리눅스 커널의 보안 모듈로, 강제 접근 제어(MAC)를 제공합니다.

모드 확인 및 전환

getenforce
setenforce 0
setenforce 1

영구 설정은 /etc/selinux/config에서 변경합니다.

컨텍스트 관리

ls -Z /var/www/html
chcon -t httpd_sys_content_t /var/www/html/index.html
restorecon -Rv /var/www/html

부울 설정

getsebool -a | grep httpd
setsebool -P httpd_enable_homedirs on