Last active
December 20, 2017 12:44
-
-
Save bkonetzny/41221d5ad0e87f8690472f09fd8a5818 to your computer and use it in GitHub Desktop.
Vagrant synced folders with symlinks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
if !Vagrant::Util::Platform.windows? | |
# On Mac, use NFS | |
config.vm.synced_folder ".", "/vagrant", type: "nfs", mount_options: ['rw', 'vers=3', 'tcp', 'fsc', 'actimeo=1'] | |
else | |
# On Windows, use SMB | |
# Needs to run CMD as admin for SMB share to work. | |
# Use "mklink /d <Link> <Target>" on Windows to create symlink which also works in guest | |
config.vm.synced_folder ".", "/vagrant", type: "smb", owner: "www-data", group: "www-data", mount_options: ['vers=3.02', 'mfsymlinks', 'dir_mode=0777', 'file_mode=0777'] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment