"The second parameter must be an absolute path of where to share the folder within the guest machine. This folder will be created (recursively, if it must) if it doesn't exist."
When I setup a synced folder like so:
linux.vm.synced_folder src_path, "/home/vagrant/go/src"
The src folder is owned by vagrant:vagrant but the go folder is owned by root:root. This prevents the pkg and bin folders from being created later.
mkdir /home/vagrant/go/pkg: permission denied
Adding owner: "vagrant", group: "vagrant" did not remedy the situation.
Vagrant 1.3.3, VirtualBox 4.2.18 r88780, OS X 10.8.5, precise64, inline shell provisioning
For now, my solution is to make the synced_folder directly in the $HOME folder. This is my complete (working) Vagrantfile: https://gist.github.com/nathany/6662802
This is working as intended. If you need to change the permissions, use an inline shell provisioner. The permissions you specify on shared folders will only apply to the deepest child. Otherwise, typical umask takes place.
Care to explain why or offer any advice? Thanks.
@nathany I ran into the same problem. My solution was to run chown -R vagrant:vagrant /home/vagrant/go with an inline script.
(I realize I'm replying to a comment almost a year old, but I too expected that setting the owner and group would also apply to the parent folders created)
For the record: I also think that this is unexpected. I got bitten today, too.
Most helpful comment
For the record: I also think that this is unexpected. I got bitten today, too.