I use vagrant and chef to develop my own blog in a virtual machine. To have easy access to the wordpress folder I created a shared folder.
Basically the wordpress folder is on my host and gets mounted as shared folder in /var/www/wordpress in the VM. The configuration is similar to:
config.vm.share_folder "foo", "/guest/path", "/host/path"
My problem is that the ownership in my VM is always vagrant:vagrant
even if I change it on my host. Ownership changes in the VM get ignored.
I cannot use chown
to set the ownership of the upload directory to www-data:www-data
.
It is possible to use chmod
and change the access restrictions to 777
, but this is a really ugly hack.
Here is what I actually want. Is this possible?:
- Development: Access to the shared folder from my host.
- Access Restriction: On the VM all files and folders should have proper and secure ownership and access restrictions.