From 5c9bf4fcfb6578ffa033fc31a0b792dee55b5f38 Mon Sep 17 00:00:00 2001 From: Miah Johnson Date: Fri, 20 Jan 2012 14:05:54 -0800 Subject: [PATCH] Sets permissions for /var directories properly if run on chef-server. This brings the fixes from COOK-985 into COOK-599 to fix both. Signed-off-by: jtimberman --- recipes/config.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/recipes/config.rb b/recipes/config.rb index 982a616c..c9f35bd7 100644 --- a/recipes/config.rb +++ b/recipes/config.rb @@ -30,8 +30,13 @@ %w{run_path cache_path backup_path log_dir}.each do |key| directory node['chef_client'][key] do recursive true - owner "root" - group root_group + if node[:recipes].include?("chef-server") + owner "chef" + group "chef" + else + owner "root" + group root_group + end mode 0755 end end