470,811 Members | 1,097 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,811 developers. It's quick & easy.

BaseHTTPServer and priviledge separation?

Hi,

to use a port below 1000 on a Unix system one needs root priviledges.
But it's dangerous to execute all of a script under those priviledges.
Therefore I'd like to drop the root priviledges as soon as possible.
(How) is this possible?

Many thanks for a hint,

Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
Jul 19 '05 #1
1 1234
> to use a port below 1000 on a Unix system one needs root priviledges.
But it's dangerous to execute all of a script under those priviledges.
Therefore I'd like to drop the root priviledges as soon as possible.
(How) is this possible?

Are you sure you don't just want to use twisted?
http://twistedmatrix.com/

It is a bit more complex to start, but for just serving
web pages it may actually be simpler. Plus you get a
lot of extra functionality built in (like dropping
privelege and chroot).

Looking at the code for twistd, they use os.setuid
and os.setgid
Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Perttu Pulkkinen | last post: by
reply views Thread by Joshua W. Biagio | last post: by
1 post views Thread by Yin | last post: by
4 posts views Thread by amfr | last post: by
reply views Thread by Jeff Gercken | last post: by
reply views Thread by Ron Garret | last post: by
13 posts views Thread by Ron Garret | last post: by
3 posts views Thread by Ron Garret | last post: by
reply views Thread by samwyse | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.