Hugo panic due to missing write permissions on /tmp/hugo_cache

I don’t think this gets enough attention, but setting the HUGO_CACHEDIR to something within each user’s $HOME directory is advantageous for several reasons:

  1. You won’t run into permission problems like this
  2. No collisions if multiple users have the same project name
  3. Persistent storage between restarts (helpful when using Hugo modules)

Actually, it did change something. With v0.92.1 and earlier you get a descriptive error message. With v0.92.2 it panics; this is a regression.

https://github.com/gohugoio/hugo/issues/9539

1 Like