LearnBoost / cluster

Node.JS multi-core server manager with plugins support.
http://learnboost.github.com/cluster
MIT License
2.29k stars 159 forks source link

Bind to port 80 and give up privileges #116

Closed zdzolton closed 13 years ago

zdzolton commented 13 years ago

Hi,

I have a web app that gets executed as root, binds to port 80 and then changes itself to a less-priviledged user.

When I try to add Cluster into the mix I receive an "Error: EACCES, Permission denied" error, at cluster/lib/master.js:791, which looks like the line where the master process binds to the port. I am calling listen() before setuid(), which worked before, but I'm guessing there's more to the story here.

Any ideas of what I should try?

Thank you,

Zach

tj commented 13 years ago

there's a "user" and "group" setting you can try, those sys calls are deferred until each worker calls listenFD()

zdzolton commented 13 years ago

Thank you, that worked!

On Tue, Jun 28, 2011 at 4:27 PM, visionmedia < reply@reply.github.com>wrote:

there's a "user" and "group" setting you can try, those sys calls are deferred until each worker calls listenFD()

Reply to this email directly or view it on GitHub: https://github.com/LearnBoost/cluster/issues/116#issuecomment-1459187

tj commented 13 years ago

woot