Intermittent 500 errors

I am getting an intermittent 500 error message when editing content

PHP Warning:  Directory C:/inetpub/wwwwroot/cms/log/cache/htmlpurifier not writable, please alter file permissions in C:\inetpub\wwwroot\cms\vendor\ezyang\htmlpurifier\library\HTMLPurifier\DefinitionCache\Serializer.php on line 302

but it’s weird, it only crops up occasionally. Note that IUSR has full permission on the logs and vendor dirs

  1. As explained.
  2. Create log/cache/htmlpurifier under your project folder yourself and make sure the log is granted with write permission.
  3. You may want to set up your project folder outside C:\ (e.g. you may use D:\websites, if you have) to avoid built-i Windows user permission issues.