diff --git a/CHANGELOG.md b/CHANGELOG.md index 751808a7c..c4e7ffe89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ BUG FIXES: - Chef solo run list properly set. [GH-1608] - Follow 30x redirects when downloading boxes. [GH-1607] - Chef client config defaults are done properly. [GH-1609] + - VirtualBox mounts shared folders with the proper owner/group. [GH-1611] ## 1.2.0 (April 16, 2013) diff --git a/plugins/providers/virtualbox/action/share_folders.rb b/plugins/providers/virtualbox/action/share_folders.rb index 4d79c0af9..9373716d1 100644 --- a/plugins/providers/virtualbox/action/share_folders.rb +++ b/plugins/providers/virtualbox/action/share_folders.rb @@ -108,8 +108,9 @@ module VagrantPlugins data = data.dup # Calculate the owner and group - data[:owner] ||= @env[:machine].config.ssh.username - data[:group] ||= @env[:machine].config.ssh.username + ssh_info = @env[:machine].ssh_info + data[:owner] ||= ssh_info[:username] + data[:group] ||= ssh_info[:username] # Mount the actual folder @env[:machine].guest.capability(