If you’ve updated to the newly released MacOS Mojave release then you might find the following issue when starting your vagrant box with NFS mounting:
Preparing to edit /etc/exports. Administrator privileges will be required…
Password: tee: /etc/exports: Operation not permitted tee: /etc/exports: Operation not permitted tee: /etc/exports: Operation not permitted
You can quickly fix this issue by following the following steps:
- Open “System Preferences”
- Go to “Security & Privacy”
- Click the “padlock” icon in the bottom-left corner where it says “Click the lock to make changes” – enter your password when prompted
- On the list of permissions on the left, select “Full Disk Access”
- Now, on the right-hand side, click the little “+” icon
- This will open a browse window, use this to select your preferred Terminal e.g. “Applications > iTerm” or “Applications > Utilities > Terminal”
- If the selected Terminal is already open, you’ll be asked to Quit it – quit the application and restart it
- When you restart the selected application, you may prompted if you’d like to allow the app to make changes to your computer – accept and enter your password if required
- Try mounting your vagrant machine and now the above error should no longer appear!
Note that this is a solution that I have tried and tested, but will be worth keeping an eye out for Vagrant/Virtualbox updates to see if they have an alternative solution.