From 9529dd8cde062119e9c8eea24e7d4f9ddf6017f6 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 9 Apr 2014 11:03:24 -0700 Subject: [PATCH] guests/linux: rsync chown group if owner now set [GH-3223] --- CHANGELOG.md | 1 + plugins/guests/linux/cap/rsync.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c1bc07b2..7d9f45d4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ BUG FIXES: - guests/fedora: Fix hostname setting. [GH-3382] - guests/fedora: Support predictable network interface names for public/private networks. [GH-3207] + - guests/linux: Rsync folders have proper group if owner not set. [GH-3223] - guests/linux: If SMB folder mounting fails, the password will no longer be shown in plaintext in the output. [GH-3203] - guests/linux: SMB mount works with passwords with symbols. [GH-3202] diff --git a/plugins/guests/linux/cap/rsync.rb b/plugins/guests/linux/cap/rsync.rb index da20779d0..a7062e37c 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]} -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