How to create /etc/exports in Mojave

I just had a similar issue and resolved it by:

  1. going to System Preferences > Security & Privacy > Privacy.
  2. Click the "lock" icon to make changes.
  3. Scroll down the list on the left-hand side and select "Full Disk Access"
  4. Click the "+" icon on the right and select the Terminal app (or in my case iTerm)

You'll now be prompted to close the app if it's already open, restart it, and on next run you'll be asked if you want to allow the app to make changes - grant the permissions and you should be back up and running.


That file is not present on macOS so you need to create it first. I would expect the vagrant software to update itself soon to explain why this error exists and how to set up macOS for vagrant, but in the mean time - here's how to place a dummy version of that file in place so that vagrant can make changes to it if needed.


There's a new layer of permissions so be sure you have granted your terminal app permissions over the /etc directory (which actually is a sum link to /private/etc so let's be clear where the actual file exists)

cd /private/etc
touch ./exports

You should be presented with a dialog asking if you wish that protected area to be accessed by the terminal app (or whatever app you wish to entitle)

mojave security permissions

Note, that once you grant terminal access, any and all scripts running there have permission, so if you want to keep your Mac more secure, consider using a text editor to make the first version of this file as that's less likely to cause damage or leakage of your private information than just letting terminal have full administrative access.

This has nothing to do with SIP or system integrity protection, so don't think you need to disable any protections with csrutil - these are new enforcements / layers of security added to Mojave that work in conjunction with SIP which places no restrictions over /etc (or /private/etc) other than perhaps keeping you from deleting the directory itself entirely.