diff --git a/plugins/guests/linux/cap/rsync.rb b/plugins/guests/linux/cap/rsync.rb index 3f4de0b13..da20779d0 100644 --- a/plugins/guests/linux/cap/rsync.rb +++ b/plugins/guests/linux/cap/rsync.rb @@ -18,7 +18,7 @@ module VagrantPlugins def self.rsync_post(machine, opts) machine.communicate.tap do |comm| - comm.sudo("find '#{opts[:guestpath]}' ! -user #{username} -print0 | " + + comm.sudo("find '#{opts[:guestpath]}' ! -user #{opts[:owner]} -print0 | " + "xargs -0 -r chown -v #{opts[:owner]}:#{opts[:group]}") end end