[Twisted-Python] Twisted perspective broker on port 80, problem

Christopher Armstrong radix at twistedmatrix.com
Wed Jun 17 16:50:54 EDT 2009

\On Wed, Jun 17, 2009 at 4:32 PM, hbd<happybrowndog at hotmail.com> wrote:
> Is there any reason why I am getting this error when I try to get
> perspective broker to be on port 80?
> twisted.internet.error.CannotListenError: Couldn't listen on any:80:
> (13, 'Permission denied').
> I made sure port 80 was not used by Apache or anything else by checking
> with netstat.

On Linux (and probably some other unixes), only root can bind to ports
<= 1024. A common solution is to use the 'authbind' program, or to
just run your program as root and then drop privileges after you bind
to the port. twistd supports that with the --uid and --gid parameters.

Christopher Armstrong

More information about the Twisted-Python mailing list