Some folks have reported that Hugo tends to fail with some odd errors
along the lines of "Permission denied" whilst trying to build the site.
Investigating this on my personal machine I can reproduce the issue with
justhugo — hugo server does not exhibit the issue. It appears as
if this has to do with our usage of Hugo Modules and the fact that
somehow those module files are being written to public/ with permission
r--r--r-- instead of anything slightly more sensible, say, rw-rw-rw-.
Testing with hugo mod vendor before running hugo seems to fix the
problem. Hence, I will be writing a build script to help with this
process, as I also fear this will affect our CI/CD pipeline.
Some folks have reported that Hugo tends to fail with some odd errors along the lines of "Permission denied" whilst trying to build the site.
Investigating this on my personal machine I can reproduce the issue with just
hugo
—hugo server
does not exhibit the issue. It appears as if this has to do with our usage of Hugo Modules and the fact that somehow those module files are being written topublic/
with permissionr--r--r--
instead of anything slightly more sensible, say,rw-rw-rw-
.Testing with
hugo mod vendor
before runninghugo
seems to fix the problem. Hence, I will be writing a build script to help with this process, as I also fear this will affect our CI/CD pipeline.