diff --git a/CHANGELOG.md b/CHANGELOG.md index 2440d57df..eee3d9a37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ BUG FIXES: same name as a real directory. [GH-3732] - core: Parallelization is more stable, doesn't crash due to to bad locks. [GH-3735] + - guests/linux: Rsync chown ignores symlinks. [GH-3744] - guests/openbsd: Remove '-v' flag from chown for rsync. [GH-3743] - provisioners/shell: Fix shell provisioner config validation when the `binary` option is set to false [GH-3712] diff --git a/plugins/guests/linux/cap/rsync.rb b/plugins/guests/linux/cap/rsync.rb index 906b33cb1..42ed6d205 100644 --- a/plugins/guests/linux/cap/rsync.rb +++ b/plugins/guests/linux/cap/rsync.rb @@ -18,8 +18,10 @@ module VagrantPlugins def self.rsync_post(machine, opts) machine.communicate.sudo( - "find '#{opts[:guestpath]}' '(' ! -user #{opts[:owner]} -or ! -group #{opts[:group]} ')' -print0 | " + - "xargs -0 -r chown -v #{opts[:owner]}:#{opts[:group]}") + "find '#{opts[:guestpath]}' " + + "'!' -type l -a " + + "'(' ! -user #{opts[:owner]} -or ! -group #{opts[:group]} ')' -print0 | " + + "xargs -0 -r chown #{opts[:owner]}:#{opts[:group]}") end end end