From 6a7e07c53f08cbbd0c0800bcabd131248deb3c85 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 11 Jan 2014 08:02:59 -0800 Subject: [PATCH] provisioners/chef: don't follow symlink when chown --- CHANGELOG.md | 1 + plugins/provisioners/chef/provisioner/base.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3592b0893..3b57e372a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,6 +58,7 @@ BUG FIXES: [GH-2792] - providers/virtualbox: Enabling internal networks by just setting "true" works properly. [GH-2751] + - provisioners/chef: When chowning folders, don't follow symlinks. - provisioners/salt: Options can now set install type and install args. [GH-2766] - synced\_folders/nfs: NFS entries are pruned on every `vagrant up`, diff --git a/plugins/provisioners/chef/provisioner/base.rb b/plugins/provisioners/chef/provisioner/base.rb index 17fa41388..8ce22bdd5 100644 --- a/plugins/provisioners/chef/provisioner/base.rb +++ b/plugins/provisioners/chef/provisioner/base.rb @@ -38,7 +38,7 @@ module VagrantPlugins @machine.communicate.tap do |comm| paths.each do |path| comm.sudo("mkdir -p #{path}") - comm.sudo("chown #{@machine.ssh_info[:username]} #{path}") + comm.sudo("chown -h #{@machine.ssh_info[:username]} #{path}") end end end