Posting this in the hopes it saves someone else next time around. I
recently received this error after moving our Node-based daemon over
to an Ubuntu box from Centos,
server.js:64
process.setgid('nobody');
^
Error: , Success
at Object.dropRootPermissions (server.js:64:15)
at server.js:57:11
at [object Object].<anonymous> (fs.js:107:5)
at [object Object].emit (events.js:61:17)
at afterRead (fs.js:878:12)
at wrapper (fs.js:245:17)
('Nul points' for useful error message...)
Turns out the issue is that Ubuntu's 'nobody' group is 'nogroup'. I'm
not aware of anyway of discovering this from within Node so my fix was
to use environment variables,
- process.setgid('nobody');
- process.setuid('nobody');
+ process.setgid(process.env.RUN_AS_GROUP || 'nobody');
+ process.setuid(process.env.RUN_AS_USER || 'nobody');
RUN_AS_GROUP=nogroup node server.js [etc]
HTH,
Paul
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en