[Mongrel] changing user/group on port 80

Jan Svitok jan.svitok at gmail.com
Thu Jun 22 17:00:55 EDT 2006

Right. If you want to run under another user *and* on privileged port,
you must start mongrel as root, a and when the port is bound you can
have mongrel drop it's privileges by Process.uid= or

Mongrel does this dropping (lib/mongrel.rb:725, in
Configurator#initialize) before the ports are bound (the block gets
executed right after the privileges drop). If these two were
exchanged, it might do what you want, although it may have other
implications, that I'm not able to tell now.


On 6/22/06, Will_Green at urscorp.com <Will_Green at urscorp.com> wrote:
> Port 80 is a privileged port, meaning only processes running as root can
> bind to that port. Even though you are initiating the command as root, you
> are telling mongrel it should run as user rails. Since rails != root,
> mongrel will not run on port 80 as with any -u value other than root.

More information about the Mongrel-users mailing list