macOS – Operation not permitted /tmp not writable

If you’re using macOS Mojave as a developer, maybe you’ve come across the following problem when trying, for instance, to update your crontab or simply just moving files around.

crontab -e
Cannot write to /tmp: operation not permitted

Perhaps you even read a couple of old solutions in Stackoverflow and elsewhere where you had to start your computer in recovery mode and do a bunch of stuff.

Well, I was at that place the other day when it hit me that all applications that I use on a regular basis like Dropbox and Keepass have alerted that in order to run OK you need to add an exception in the security settings.

The same goes for this problem. Make sure your terminal software (in my case iTerm2) is allowed Full Disk Access (see image below).

Voilá. Working in iTerm2 is now without hiccups again. No more operation not permitted when trying to access the /tmp folder.

NOTE! You need to click on the lock at the lower left in the image in order to get to add iTerm or Terminal to the Full Disk Access.

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close