guests/linux: rsync chown group if owner now set [GH-3223]

This commit is contained in:
Mitchell Hashimoto 2014-04-09 11:03:24 -07:00
parent 794ca7a4df
commit 9529dd8cde
2 changed files with 2 additions and 1 deletions

View File

@ -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]

View File

@ -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