mitchellh/vagrant — pull request #3544 by benesch (2014-04-25 20:11:34+00:00)
Title: synced_folders/rsync: only chown when necessary [GH-3525]

Run remote rsync as root to guarantee that rsync can write to guestpath.
This obviates the need to chown the guestpath to the SSH user prior to
sync.

This brings a substantial speedup (2x on a moderately-sized shared
folder) and properly triggers filesystem notifications on only the files
changed by a given sync.

This is the fix I described for #3525—I figured I'd put my money where my mouth is.

Tested with an Ubuntu 12.04 box and works like a charm.

Note that though I changed the capabilities for all guests that support rsync, I haven't actually tested on those OSes. I figured I'd wait for your feedback before trying to test this everywhere.