title: nodejs with gzip and forever-node -- write access to folder needed?
body: <p>I've got a nodejs server running on an ubuntu box using <a href="https://github.com/nodejitsu/forever" rel="nofollow noreferrer">forever</a> to daemonize the process. I've taken care of most things like <a href="https://stackoverflow.com/a/414258/1469797">running on port 80 and 443</a> so I don't have to invoke it with <code>sudo</code> and it's all good.</p>
  
  <p>Now though I've added <a href="https://github.com/medseek-engineering/connect-gzip/" rel="nofollow noreferrer">connect-gzip</a> so I can compress all the static files I'm sending. On my windows box(dev) I have no problem running the server but when I try to run it on the ubuntu box I cannot access the server.</p>
  
  <p>Here's the log I get from forever</p>
  
  <pre><code>Environment: prod
  Using port 80 as redirect and port 443 as main.
  
  events.js:72
          throw er; // Unhandled 'error' event
                ^
  Error: EACCES, open '/home/matt/myproject/src/main/webapp/build/dist/index.html.1414163787000.gz.28103.tmp'
  error: Forever detected script exited with code: 8
  error: Script restart attempt #1
  Environment: prod
  Using port 80 as redirect and port 443 as main.
  
  events.js:72
          throw er; // Unhandled 'error' event
                ^
  Error: EACCES, open '/home/matt/myproject/src/main/webapp/build/dist/index.html.1414163787000.gz.28109.tmp'
  error: Forever detected script exited with code: 8
  </code></pre>
  
  <p>If I run forever using <code>sudo</code> it's fine. I think this is happening because either <code>connect-gzip</code>, <code>node</code>, or <code>forever</code> doesn't have write permissions to that folder. Is this correct?</p>
  
  <p>How can I allow write access to my folder for just node/connect-gzip/forever so I don't have to use sudo?</p>