Skip to content

Instantly share code, notes, and snippets.

@sumeetpareek
Created April 9, 2015 20:31
Show Gist options
  • Save sumeetpareek/1ccb640c8fb8d985d34f to your computer and use it in GitHub Desktop.
Save sumeetpareek/1ccb640c8fb8d985d34f to your computer and use it in GitHub Desktop.
Vagrant, Ansible permissions and SSH workarounds for Windows
# On windows, default synced folders get full permissions, unless explicitly called out.
# This causes some errors. So we explicitly call out mount options.
# Map a host directory to the vbox so that we can continue development on the host, while running the site on guest VM
# config.vm.synced_folder "www", "/var/www", :nfs => { :mount_options => ["dmode=777","fmode=777"] }
config.vm.synced_folder "./", "/vagrant",
mount_options: ["dmode=777,fmode=664"]
config.vm.synced_folder "www", "/var/www-shared",
group: "root", owner: "root",
mount_options: ["dmode=775,fmode=664"]
# NOTE: Syncing under /root directory (eg: /root/.ssh) does not work during vagrant up
config.vm.synced_folder "~/.ssh/", "/home/vagrant/.ssh/",
mount_options: ["dmode=700,fmode=600"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment