I am running spacemacs emacs and recently had to migrate my macbook to a new macbook. After doing that, I am having trouble using magit. When I try to commmit using magit from the magit status interface, I get an error:

files--ensure-directory: Creating directory: Permission denied, /var/folders/8sUnable to load color "#212026"

I also see what seems to be a related error on startup:

Error running timer ‘mac-setup-help-topics’: (file-missing "Creating file with prefix" "No such file or directory" "/var/folders/8s/y0zrtc6n38j0gwnvz7_l4q1h0000gn/T/jka-com")

I've got no idea how to go about debugging for fixing this. Does anyone have any ideas?

What I've tried so far: 1) Remove the .emacs.d folder and reinstall spacemacs. 2) Reinstall the emacs for mac release from here

  • /var/folders (aka /private/var/folders) on macOS are for per user temporary files and caches. It sounds like, as part of your migration, you pulled over a magit "cache" that was stored elsewhere, and that is referring to folders in /var/folders that obviously no longer exist. You need to "clear" this "magit cache". Not, being a magit user I couldn't tell you where to look, but I understand its docs are pretty good. You could also try a find/grep from your home directory, a la find ~/ -type f | xargs grep y0zrtc6n38j0gwnvz7, and see what results you get.
    – nega
    Jul 24, 2019 at 17:27

1 Answer 1


The problem here has to do with a variable TMPDIR set in the .spacemacs.env directory. This env variable for spacemacs specifies a folder in /var/folders. Since that folder no longer existed when I migrated, things started to break.

The fix was to rename/delete .spacemacs.env and then restart emacs/spacemacs.

  • Thanks! Took me a minute to locate that file. For others, it's ~/.spacemacs.d/.spacemacs.env Dec 13, 2021 at 19:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.