Binding a Daemon Process to a lower port without root?

Bryan Sant bryan.sant at
Mon Sep 17 08:46:39 MDT 2007

On 9/15/07, Steve <smorrey at> wrote:
> Ahh now thats a very elegant solution, thank you that looks like it
> may solve everything.
> Sincerely,
> Steve
> > The general method is to start as root, do what you need to as root, and
> > then switch to the you want to run as.  Cherokee (another web
> > server I had sitting around) does this switch by calling initgroups(3),
> > setgid(2), and then setuid(2).

Alternatively, if you don't have access to the source, you can use
iptables to redirect port 80 to the non-privileged port your app is
listening on.


More information about the PLUG mailing list