
我已經將 CentOS 8 Stream 設定為 SELinux,permissive
但日誌中仍然有一堆紅線,例如:
SELinux is preventing /usr/lib/systemd/systemd from name_connect access on the tcp_socket port 80
這些是真實的還是只是印刷的——如果處於restrictive
模式下會發生什麼?
答案1
根據文件:
當 SELinux 在寬容模式下運作時,不強制執行 SELinux 策略。系統保持運作狀態,SELinux 不會拒絕任何操作,而只會記錄 AVC 訊息,然後可用於故障排除、偵錯和 SELinux 策略改進。
另請參閱/etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=permissive