nodejitsu/forever — Issue #196: Running forever as another user with sudo appears to ignore log file parameters
Author: markbao
Created: 2011-12-17 04:40:18+00:00
State: open

Tested on node 0.6.5 and 0.4.12.

Running forever using `sudo -u` appears ignore the specified log file parameters.

```
+ sudo -u app /usr/local/bin/forever start -p /logs -l /logs/forever.log -o /logs/out.log -e /logs/err.log server.js
The "sys" module is now called "util". It should have a similar interface.
info: Forever processing file: server.js

{
"process": {
"pid": 11307,
"uid": 1000,
"gid": 1000,
"cwd": "/srv/synapse",
"execPath": "/usr/local/bin/node",
"version": "v0.6.5",
"argv": [
"node",
"/usr/local/bin/forever",
"start",
"-p",
"/logs",
"-l",
"/logs/forever.log",
"-o",
"/logs/out.log",
"-e",
"/logs/err.log",
"server.js"
],
"memoryUsage": {
"rss": 18210816,
"heapTotal": 14161088,
"heapUsed": 7707424
}
},
"os": {
"loadavg": [
0.19287109375,
0.05517578125,
0.0107421875
],
"uptime": 3449.821602155
},
"trace": [],
"stack": [
"Error: EACCES, permission denied '/root/.forever/n6v2.log'"
],
"level": "error",
"message": "uncaughtException"
}
```