Im trying to start my vagrant environment on the new macOS mojave getting an error:

tee: /etc/exports: Operation not permitted
tee: /etc/exports: Operation not permitted
tee: /etc/exports: Operation not permitted
The nfsd service does not appear to be running.

On previous versions /etc/exports exists, but not in mojave, why? I cant start my virtual environment :(

I also tried to make a find on "exports" to see if is in other location but nothing was found, this file is renamed in this version?


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.

  • worked like a charm! – Periback Oct 5 '18 at 9:15
  • This worked, but only after a reboot. I believe that vagrant tried to do something to /private/etc/exports and that particular path got stuck in a weird state. I figured this out because I could touch f but not touch exports, until after a reboot. – apinstein Feb 1 '19 at 22:35
  • I had just updated my iTerm version and had the same issue. This fixed it for me. – Thijs Riezebeek Feb 6 '19 at 12:38

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .