SELinux に関連しているように見えるディレクトリのアクセス許可を変更する際に問題が発生しています。SELinuxをa)シェフクライアントセッションの残りの部分で、b)永久に無効にする方法を見つけようとしています。
リソース:
# Change permissions for mounted repository
directory "/home/analytics" do
owner "analytics"
mode "711"
end
エラー:
/sbin/restorecon set context /analytics/file failed:'Operation not supported'
環境:
- キッチン、Vagrant ドライバー、および VirtualBox をテストします。
- ボックス - Chef プロビジョナーレス centos-5.10。
SELinuxがうまくいかないようです。偉大な。SELinuxを無効にしましょう!
Chef's box の在庫構成は permissive に設定されています。
[root@analytics selinux]# cat /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 - SELinux is fully disabled.
SELINUX=permissive
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
構成をテンプレート化して無効に設定できますが、それは再起動後にのみ適用されます。通常、現在のセッションで SELinux を無効にするには、CLI (sestatus、setenforce など) を使用します。私たちのクックブック (および公式のクックブック) は、この機能に依存しています。しかし、ここで壊れているようです...
[root@analytics selinux]# sestatus
bash: sestatus: command not found
[root@analytics selinux]# getstatus
bash: getstatus: command not found
[root@analytics selinux]# rpm -q policycoreutils
policycoreutils-1.33.12-14.13.el5
では、ボックスを再起動したり Chef を 2 回実行したりせずに SELinux を無効にするにはどうすればよいでしょうか?