masayuki5160's diary

名古屋でエンジニアしてます。

chefとvagrantとSELinux

yumでapacheをいれたあとは問題なく起動するのに、
なぜかchefでapacheをyumでいれてtemplateをつかってhttpd.confを書き換えたらpermmision errorとかなってはまってました。。

が結局SELinuxのせいでした。
単純に無効にするだけであっさり解決しましたー

vi /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=enforcing
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
# SETLOCALDEFS= Check local definition changes
SETLOCALDEFS=0