|
[ CentOS/セキュリティ ] SELinuxを有効・無効にする †SELinuxの動作モードには以下があります。 * Enforcing SELINUX=enforcing
SELinuxパーミッションのチェックを行い、アクセスを拒否する。
* Permissive SELINUX=permissive
SELinuxパーミッションのチェックはするが実際にアクセスの拒否はしない
* disabled SELINUX=disabled
無効
SELinux状態確認 †[root@linux ~]# getenforce ← SELinux状態確認 Enforcing ← SELinux有効 Permissive ← SELinuxチェックのみ disabled ← SELinux無効 設定ファイルの編集 †[root@linux ~]# cp -a /etc/selinux/config /etc/selinux/config.org ←■ 元のファイルをバックアップ [root@linux ~]# vi /etc/sysconfig/selinux # 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 - SELinux is fully disabled. SELINUX=permissive ←■ 有効=enforcing チェックのみ=permissive 無効=disabled # SELINUXTYPE= type of policy in use. Possible values are: # targeted - Only targeted network daemons are protected. # strict - Full SELinux protection. SELINUXTYPE=targeted 設定後、マシンを再起動します。 ラベルの再構築 †SELinuxを無効にすると、ラベルが削除されるので、有効後は必ずラベルの再構築を行う必要があります。 [root@linux ~]# fixfiles relabel 実行後は、/tmp以下のファイルが全て削除されるので、Xの再起動が必要です。 SELinux でFTPを動かす場合 未確認情報 †[root@linux ~]# setsebool -P ftp_home_dir 1
|