2.2. SELinux の Permissive モードへの変更
拒否メッセージのトラブルシューティングやセキュリティーポリシーのデバッグを行うには、SELinux を permissive モードで実行するように設定します。このモードでは、システムは Access Vector Cache (AVC) イベントをログに記録しますが、アクティブなポリシーは適用しないため、システム操作をブロックすることなく影響を分析できます。SELinux は、拒否については一度だけログに記録します。
前提条件
-
selinux-policy-targeted、libselinux-utils、およびpolicycoreutilsパッケージがシステムにインストールされている。 -
selinux=0またはenforcing=0カーネルパラメーターは使用されません。
手順
テキストエディターで
/etc/selinux/configファイルを開き、SELINUX=permissiveオプションを設定します。# 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 # SELINUXTYPE= can take one of these two values: # targeted - Targeted processes are protected, # mls - Multi Level Security protection. SELINUXTYPE=targetedシステムを再起動します。
# reboot
検証
システムの再起動後に、
getenforceコマンドがPermissiveを返すことを確認します。$ getenforce Permissive