title: Let's encrypt SSL couldn't start by "Error: EACCES: permission denied, open '/etc/letsencrypt/live/domain.net/privkey.pem'"
body: <p>I tried to use SSL by Node.js but it doesn't work because <code>permission denied</code>.</p>
  
  <pre><code>try {
  var TLSoptions = {
      key: fs.readFileSync("/etc/letsencrypt/live/domain.work/privkey.pem"),
      cert: fs.readFileSync("/etc/letsencrypt/live/domain.work/cert.pem")
  };
  
  https.createServer(TLSoptions, app).listen(port, host, function() {
     console.log("TLS Website started.")
  }); catch(e) {
      console.log(e)
  }
  </code></pre>
  
  <p>=></p>
  
  <pre><code>{ Error: EACCES: permission denied, open '/etc/letsencrypt/live/domain.work/privkey.pem'
  at Object.fs.openSync (fs.js:663:18)
  ... (Librarys dump)
  errno: -13,
  code: 'EACCES',
  syscall: 'open',
  path: '/etc/letsencrypt/live/domain.work/privkey.pem' }
  </code></pre>
  
  <p>So I tried re-make files of *.pem.</p>
  
  <pre><code>rm -f /etc/letsencrypt/live
  rm -f /etc/letsencrypt/archive    
  rm -f /etc/letsencrypt/renewal
  sudo ./letsencrypt-auto certonly -a standalone -d domain.work
  </code></pre>
  
  <p>and check file authority.</p>
  
  <pre><code>/etc/letsencrypt/live/domain.work$ ls -lsa
  total 12
  4 drwxr-xr-x 2 root root 4096 Jan  3 21:56 .
  4 drwx------ 3 root root 4096 Jan  3 21:56 ..
  0 lrwxrwxrwx 1 root root   37 Jan  3 21:56 cert.pem -&gt; 
  ../../archive/domain.work/cert1.pem
  0 lrwxrwxrwx 1 root root   38 Jan  3 21:56 chain.pem -&gt; 
  ../../archive/domain.work/chain1.pem
  0 lrwxrwxrwx 1 root root   42 Jan  3 21:56 fullchain.pem -&gt; 
  ../../archive/domain.work/fullchain1.pem
  0 lrwxrwxrwx 1 root root   40 Jan  3 21:56 privkey.pem -&gt; 
  ../../archive/domain.work/privkey1.pem
  
  /etc/letsencrypt/archive/domain.work$ ls -lsa
  total 24
  4 drwxr-xr-x 2 root root 4096 Jan  3 21:56 .
  4 drwx------ 3 root root 4096 Jan  3 21:56 ..
  4 -rw-r--r-- 1 root root 1789 Jan  3 21:56 cert1.pem
  4 -rw-r--r-- 1 root root 1647 Jan  3 21:56 chain1.pem
  4 -rw-r--r-- 1 root root 3436 Jan  3 21:56 fullchain1.pem
  4 -rw-r--r-- 1 root root 1708 Jan  3 21:56 privkey1.pem
  </code></pre>
  
  <p>but It is not resolved and I cannot find any mistakes and problems.<br>
  How to resolve this problem?</p>