HUGO

A quick fix to Windows permissions errors and a better one

In the past, I’ve had multiple issues with compiling Hugo sites on Windows 10. It was always some kind of error involving permissions

Well, due to a similar error-googling-fixing loop for an unrelated software, I’ve tested and perfected a new trick. If you’re having trouble with the static folder or static images, or permissions errors, this is what worked for me:

  1. Open your antivirus software.
  2. Turn it off. (For extra safety, you might want to disconnect from the internet and/or do sandboxing while you do this).
  3. Open command line but “Run as Administrator”.
  4. Compile stuff.
  5. Turn antivirus back on.

Sorry, but killing the emergency medics next door so that I can drink that nice red juice from the bottle where green foam is coming out is a bad idea. That’s not a solution, that is a workaround.

Check the documentation of your antivirus program and find out how to add Hugo’s binary to a safe execution list (different name depending on AV solution). Find out, why your AV solution blocks Hugo’s access (probably somebody clicked on a “silence” or “ignore” button when it first warned about that “suspect binary trying to access file”).

2 Likes

Ah, my bad, thanks!

Should I just delete this post then, or is there like a [REDACTED] tag I can use?

(Also, I was going to try your suggestion, but first I downloaded the latest release, installed it, and… everything works as it should with no workarounds or AV deactivations or exclusion-listing. HOW)

No worries, rename it into something like “a quick fix and a better one”. :slight_smile:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.