[Twisted-Python] twisted.web problem on FreeBSD 4.7
radix at twistedmatrix.com
Fri Dec 27 23:30:38 EST 2002
On Fri, Dec 27, 2002 at 08:23:08PM -0800, douglas savitsky wrote:
> >On Thu, 26 Dec 2002, "douglas savitsky" <dsavitsk at mail.e-coli.net> wrote:
> >> #mktap web --path /usr/www --port 80
> >NEVER RUN MKTAP AS ROOT.
> >I mean it. twistd will run the server as the user who ran mktap, by default.
> >Thus, you want to run mktap as www-data or give appropriate --uid/--gid
> FreeBSD will only allow root to bind ports lower than 1024. further
mktap doesn't bind ports, twistd does. The point is that you run
`mktap' as the user who you ultimately want the process to be run as,
and if you need root privelages to bind the ports it uses, run
`twistd' as root. It'll drop privs right after it binds.
> mktap --port=80 --path=/usr/www --uid=65534 --gid=65534
> says that --uid is not recognised. last
That's odd. Can you check the output of `mktap --help'? Also mktap
> man mktap
> says there is no manpage so I am not sure where to look for this.
If you're using the Ports Twisted package, maybe the problem is with
it? If you're using the tarball, the manpages are located in doc/man.
> so. if I can't run as root, how do I run
Run mktap as nobody (or, once you figure out what the problem is, with
the --uid option), and twistd as root.
> 65534 was obtained from
> >>> pwd.getpwnam ('nobody')[2:4]
Twisted | Christopher Armstrong: International Man of Twistery
Radix | Release Manager, Twisted Project
More information about the Twisted-Python