473,408 Members | 2,477 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

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 1292
> 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Perttu Pulkkinen | last post by:
Content management system I'm working consists pages, categories, users (and images). It is in the first place dircted to companies where 1-10 persons are taking care of site content. I am thinking...
0
by: Joshua W. Biagio | last post by:
Hello all, I am having difficulty getting the HTTP/1.1 support (i.e. pipelining and persistent connections) for the BaseHTTPServer library to work. When I change the line for the protocol in...
1
by: Yin | last post by:
Hello. I am using the basehttpserver to implement the HTTP protocol to serve a fairly large lexicon that I have loaded as a dictionary in python. Rather than writing a whole server, I would like...
2
by: Tortelini | last post by:
I am making custom web server using HTTPServer and want to be able to access it simultaneously from different computers. To achieve multithreading, I have been experimenting with ThreadingMixIn...
4
by: amfr | last post by:
>From the BaseHTTPServer module, how do i gget the POST or GET data sent by the client? Is it stired the the file they requested? e.g. objectname.path
0
by: Jeff Gercken | last post by:
I want my http server to return a default form, regardless of the GET request, but I'm a bit of a noob and have no idea how. I'm trying to write a platform-independent captured portal for my...
0
by: Ron Garret | last post by:
I'm write a web server using BaseHTTPServer. It can't be a CGI because it has to do some weird server-push stuff as database updates come in. But I still need to process form inputs as if it were...
13
by: Ron Garret | last post by:
I'm trying to figure out how to use BaseHTTPServer. Here's my little test app: ================================= #!/usr/bin/python from BaseHTTPServer import * import cgi
3
by: Ron Garret | last post by:
I have a fairly large web app written in Python as a CGI fairly elaborate CGI. All of the requests go through a single CGI script which does authentication and session management and then...
0
by: samwyse | last post by:
I've just now submitted two issues to the issue tracker: 1491 BaseHTTPServer incorrectly implements response code 100 RFC 2616 sec 8.2.3 states, "An origin server that sends a 100...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.