services and use privileged ports, and so I've been accumulating strategies
downgrading to a more restricted user after the ports been acquired via
process.setuid/setguid. There turns out to be enough subtlety in this
(e.g. setuid("123") and setuid(123) are not at all the same thing) that I
decided to make it a stand-alone utility to maybe spare someone else a few
minutes of pain.
Details here https://github.com/femto113/node-downgrade-identity
By default it supports using SUDO environment variables and npm command
line arguments, so with a server.js like
var server = require("http").createServer().on("listening",
% sudo node server.js
% sudo npm start --setuid=something --setgid=something
"just work", and with a couple lines of code you can make it work with a
command line parser like optimist as well.
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 firstname.lastname@example.org
To unsubscribe from this group, send email to
For more options, visit this group at
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to email@example.com.
For more options, visit https://groups.google.com/groups/opt_out.