paliarush / magento2-vagrant-for-developers

Vagrant Box for Magento 2 Developers
MIT License
447 stars 165 forks source link

NFS Permission issues on MacOS Sierra #140

Open nfourteen opened 7 years ago

nfourteen commented 7 years ago

Apache and PHP-FPM are running with vagrant:vagrant permissions. However, the shared folder on my Mac is not being mounted to the /vagrant directory. Instead, my vagrant-magento folder is being mounted on the guest machine at /Users/<user-name>/Sites/vagrant-magento. I believe this is why I'm running into permissions issues, i.e. SSHed into the box I can't run rm -rf var/* and rm -rf pub/static/* only deletes some files but others aren't deleted because permissions are denied. Furthermore, running npm while SSHed into the box to work with grunt is having all kinds of permission issues.

Any ideas on how to overcome these permission issues?

nfourteen commented 7 years ago

Some more information:

Folder permissions:

Was the shared folder designed to be mounted to /Users/<user-name>/Sites/vagrant-magento in the guest box?

nfourteen commented 7 years ago

After some digging, I believe this is an issue with nfsd in Mac OSX Sierra.

See: NFS permission problem on MacOS Sierra and all sorts of permission errors with nfs on osx sierra.

Running the following command from the host machine in the root of the shared folder, i.e. /Users/<user-name>/Sites/vagrant-magento/magento2ce appears to refresh all NFS links. Then I can run commands via SSH in the guest machine and everything seems to work as expected, i.e. no permission issues.

ls -lR > /dev/null

I'll leave this issue open for now in case anyone else runs into this problem, but it can be closed as it's not an issue related to this repo.

refaelgold commented 5 years ago

Try to give the right permission for full disk at mac OS

46011600-a3dc9500-c0c6-11e8-9e44-f75fd7697fcf 46011598-a2ab6800-c0c6-11e8-8846-c9759ce82364