title: EPERM error while trying to read fullchain.pem
body: <p>I'm trying to host an HTTPS website with Node.js on my Windows 10 computer, but Node.js has suddenly stopped being able to read the <code>fullchain.pem</code> I obtained using <a href="https://certbot.eff.org/" rel="nofollow noreferrer">Let's Encrypt's Certbot</a>.</p>
  <p>This is my Node.js code:</p>
  <pre class="lang-js prettyprint-override"><code>const fs = require(&quot;fs&quot;)
  const https = require(&quot;https&quot;)
  const FS_OPTIONS = {
      encoding: &quot;utf-8&quot;,
      flag: &quot;r&quot;,
  }
  const key = fs.readFileSync(&quot;C:/Certbot/live/subdomain.example.com/privkey.pem&quot;, FS_OPTIONS)
  const cert = fs.readFileSync(&quot;C:/Certbot/live/subdomain.example.com/fullchain.pem&quot;, FS_OPTIONS)
  https.createServer({ key, cert }, (req, res) =&gt; {
      // do stuff...
  }).listen(8888)
  </code></pre>
  <p>However, when I run it, I receive the following error:</p>
  <pre><code>Error: EPERM: operation not permitted, open 'C:/Certbot/live/subdomain.example.com/fullchain.pem'
      at Object.openSync (fs.js:476:3)
      at Object.readFileSync (fs.js:377:35)
      at Object.&lt;anonymous&gt; (D:\Users\...\index.js:8:17)
      at Module._compile (internal/modules/cjs/loader.js:1063:30)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
      at Module.load (internal/modules/cjs/loader.js:928:32)
      at Function.Module._load (internal/modules/cjs/loader.js:769:14)
      at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
      at internal/main/run_main_module.js:17:47 {
    errno: -4048,
    syscall: 'open',
    code: 'EPERM',
    path: 'C:/Certbot/live/subdomain.example.com/fullchain.pem'
  }
  </code></pre>
  <p>The only way I can bypass this is by running as administrator, but this is very strange, as this was not required before.</p>
  <p>How can I restore this to its previous behavior?</p>