my vagrant settings
config.nfs.map_uid = 0
config.nfs.map_gid = 0
config.vm.share_folder "v-data", "/opt/webapp", "source"
config.vm.share_folder "v-data", "/home/vagrant/customization", "home"
my permissions on the host source
dir defined above
➜ source git:(master) ✗ ls -al source
total 8
drwxr-xr-x 4 timsabat staff 136 Jan 5 11:05 .
drwxr-xr-x 19 timsabat staff 646 Jan 5 11:24 ..
-rw-r--r-- 1 timsabat staff 2 Jan 5 10:17 .gitignore
drwxr-xr-x 2 timsabat staff 68 Jan 5 11:05 from_host
what i see on my guest at /opt/webapp
vagrant@lucid64:/opt/webapp$ ls -al
total 8
drwxr-xr-x 2 root root 4096 2012-01-05 11:23 .
drwxr-xr-x 5 root root 4096 2011-12-21 10:55 ..
-rw-r--r-- 1 root root 0 2012-01-05 11:23 me.txt
how do i get the permissions to match?
You are going to have to fix those permissions when you provision the VM, using something like Chef and then doing a
chown user:user folder/
to whatever folder and user you want. See Issue 758.Also, you might want to reset your
config.nfs.map_uid
andconfig.nfs.map_gid
settings. I would set them to:auto
which is the default and that works for most of the use-cases.hth.