By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,957 Members | 2,038 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,957 IT Pros & Developers. It's quick & easy.

BaseHTTPServer and priviledge separation?

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
> 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.