Symbolic links and synced folders in Vagrant

The accepted answer is no good. The question describes an issue with synced folders, not shared folders. The proposed solution would have no effect on an rsynced (not shared) folder. And even if the OP was using a shared folder, the accepted answer’s suggestion is something that had already been integrated into vagrant as of 1.1, released 15 months before the OP posted the question (not to mention VirtualBox’s shared folders are abysmally slow).


I encountered this same issue: on OS X, I got the symlink has no referent rsync error. I was personally able to solve it by adding particular rsync args to my vagrantfile:

config.vm.synced_folder ".", "/var/www", type: "rsync", rsync__args: ["--verbose", "--archive", "--delete", "-z"]

I also opened this issue on vagrant’s github to point out something that appears to be wrong with their default value for rsync__args (specifically, that one of the default args, --copy-links, seems to be breaking another, --archive, at least as far as copying broken symlinks is concerned).

Leave a Comment