title: Can't access letsencrypt certificate while certificates can be editable by current user
body: <p>I'm having an error saying that <code>EACCES: permission denied, open '/etc/letsencrypt/live/example.com/privkey.pem'</code> while that file can be accessed and modified by the current user that I'm using while running that nodejs project.
  I do the answer <a href="https://stackoverflow.com/questions/48078083/lets-encrypt-ssl-couldnt-start-by-error-eacces-permission-denied-open-et">here</a> and it allows me to access that file, but I'm still having that error when I run my code on pm2, what's wrong here?</p>
  
  <p>My error saying that </p>
  
  <pre><code>{ Error: EACCES: permission denied, open 
      '/etc/letsencrypt/live/example.com/privkey.pem'
      at Object.openSync (fs.js:438:3)
      at Object.readFileSync (fs.js:343:35)
      at Object.&lt;anonymous&gt; (/home/samsung/projects/samsunggalaxy/galaxy/dist/index.js:126:17)
      at Module._compile (internal/modules/cjs/loader.js:701:30)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
      at Module.load (internal/modules/cjs/loader.js:600:32)
      at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
      at Function.Module._load (internal/modules/cjs/loader.js:531:3)
      at Function._load (/usr/lib/node_modules/pm2/node_modules/@pm2/io/build/main/metrics/httpMetrics.js:172:43)
      at Object.&lt;anonymous&gt; (/usr/lib/node_modules/pm2/lib/ProcessContainerFork.js:27:21)
      at Module._compile (internal/modules/cjs/loader.js:701:30)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
      at Module.load (internal/modules/cjs/loader.js:600:32)
      at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
      at Function.Module._load (internal/modules/cjs/loader.js:531:3)
      at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
    errno: -13,
    syscall: 'open',
    code: 'EACCES',
    path: '/etc/letsencrypt/live/example.com/privkey.pem' }
  </code></pre>
  
  <p>While my code on reading the file using nodejs was </p>
  
  <pre><code>import https from 'https';
  import { priv_key, cert} from './custom/certs';
  const fs = require('fs');
  const socket = require('socket.io');
  
  const option = {
      key: fs.readFileSync(priv_key), // '/etc/letsencrypt/live/example.com/privkey.pem'
      cert: fs.readFileSync(cert), // '/etc/letsencrypt/live/example.com/cert.pem'
      requestCert: false,
      rejectUnauthorized: false,
  };
  
  option.agent = new https.Agent(option);
  
  const httpsServer = https.createServer(option, app);
  const httpsIo = socket.listen(httpsServer)
  httpsServer.listen(3005, () =&gt; {
      console.log(`started on port ${httpsServer.address().port}`);
  });
  </code></pre>