Using authbind with Node.js
After recommending a method for dropping root privileges in a previous post, the community gave a bunch of recommendations for alternative methods of doing the same thing. Several people mentioned authbind, which is a simple utility for running apps and giving them permissions to listen to the privileged ports (below 1024).
Here are some commands you can run to get authbind up and running on your Debian based server. I'm sure that if you have a different distro, you probably only need to change the installation line.
# Install authbind in Debian/Ubuntu sudo apt-get install authbind # Configure authbind sudo touch /etc/authbind/byport/80 sudo chown user /etc/authbind/byport/80 sudo chmod 755 /etc/authbind/byport/80 # Run simple node app authbind node server.js # Run node app with forever authbind --deep forever server.js