Closed astorm closed 8 years ago
In case it's helpful at all, I had a similar problem with Docker/Apache. I solved it in the startup script for my Docker Apache instance by creating a new user with the UID that already owns the webroot and running Apache as that user.
If it's possible to do something similar in Vagrant, maybe impersonating the owner is easier than changing the permissions/ownership.
I can confirm that using NFS on Mac OS X Yosemite 10.10.2 also resolves the permission issues.
Using Vagrant 1.6.5 with Virtual Box 4.3.2 on OS X 10.10.1 (Yosemite), the default vagrant setup results in a number of permissions errors that prevent Magento from running. Magento can't write to the
var/cache
folder or thevar/generation
folder, and new folders/files created from a web context seem to ignore PHP's umask setting and are created without the necessary write permissions.Having the
/var/www/magento2
folder sync withappears to fix this problem, ("appears to" because I'm not familiar enough with how Vagrant handles permissions, umasks, etc. between the host/guest OS to know for certain that this has completely solved the problem)
Assuming this doesn't interfere with other systems, it'd be a good idea to ship with this as the default so Mac users don't run into this problem.