Merge pull request #3486 from benesch/fix-rsync-owner-group-linux
guests/linux: rsync chown if either user or group incorrect [GH-3485]
This commit is contained in:
commit
b18865edff
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue