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…

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:

  1. Open “System Preferences”
  2. Go to “Security & Privacy”
  3. Click the “padlock” icon in the bottom-left corner where it says “Click the lock to make changes” – enter your password when prompted
  4. On the list of permissions on the left, select “Full Disk Access”
  5. Now, on the right-hand side, click the little “+” icon
  6. This will open a browse window, use this to select your preferred Terminal e.g. “Applications > iTerm” or “Applications > Utilities > Terminal”
  7. If the selected Terminal is already open, you’ll be asked to Quit it – quit the application and restart it
  8. 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
  9. 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.

Would love your thoughts, please comment.x