I've got a nodejs server running on an ubuntu box using forever to daemonize the process. I've taken care of most things like running on port 80 and 443 so I don't have to invoke it with sudo and it's all good.
Now though I've added connect-gzip 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.
Here's the log I get from forever
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
If I run forever using sudo it's fine. I think this is happening because either connect-gzip, node, or forever doesn't have write permissions to that folder. Is this correct?
How can I allow write access to my folder for just node/connect-gzip/forever so I don't have to use sudo?