title: Elixir Phoenix production server has issue with Letsencrypt renewal
body: <p>I have a site built with Elixir Phoenix frame work. The website runs fine in both dev and prod mode.</p>
  
  <p>When the phoenix server is running in dev mode, I have no issue renewingLet's Encrypt certificate, but when the <strong>exact same</strong> app is running in prod mode, I keep getting permission error when trying to renew. Please noted that I am talking about the <strong>exact same</strong> app, on the <strong>same</strong> FreeBSD server, executed by the <strong>same</strong> user - both command without <code>sudo</code>. The <strong>only</strong> difference is <code>MIX_ENV=prod</code></p>
  
  <p>I also noted that in prod mode, the phoenix server log an 404 error when Letsencrypt is trying to access my <code>priv/static/.well-known/acme-challenge/(some-unique-string)</code> My basic set up for phoenix + letsencrypt is detailed in <a href="https://medium.com/@a4word/phoenix-app-secured-with-let-s-encrypt-469ac0995775#.dkziajbxe" rel="nofollow noreferrer">this blog post</a></p>
  
  <p><strong>The question is: how is phoenix server treating directory/file permission differently between `prod' and 'dev' mode?</strong></p>
  
  <ul>
  <li>Using Elixir 1.2.4 and Phoenix 1.1.4</li>
  </ul>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>Folks, since LetsEncrypt and Phoenix framework evolve rapidly, the issue I listed above is no longer an issue if you are using the latest cerbot from LetsEncrypt and Phoenix 1.2.0</p>
  
  <p>This is not necessary an answer to the original questions though.</p>