From ee5d8e23585ad92eabc6783bd417f0d32fcb38d0 Mon Sep 17 00:00:00 2001 From: Nikhil Benesch Date: Tue, 15 Apr 2014 16:55:49 -0400 Subject: [PATCH] guests/linux: rsync chown if either user or group incorrect [GH-3485] --- plugins/guests/linux/cap/rsync.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/guests/linux/cap/rsync.rb b/plugins/guests/linux/cap/rsync.rb index a7062e37c..79e68469f 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 #{opts[:owner]} -or ! -group #{opts[:group]} -print0 | " + + comm.sudo("find '#{opts[:guestpath]}' '(' ! -user #{opts[:owner]} -or ! -group #{opts[:group]} ')' -print0 | " + "xargs -0 -r chown -v #{opts[:owner]}:#{opts[:group]}") end end