On 2010-11-15, Tim Arnold <a_j...@bellsouth.net> wrote: > On Nov 15, 10:41 am, Tim Harig <user...@ilthio.net> wrote: >> On 2010-11-15, Tim Arnold <a_j...@bellsouth.net> wrote: >> >> > How can I enable the server process to write into the client's >> > directories? >> > If I change the inetd service to run as 'root', I guess that would >> > work, but then the client couldn't remove the files put there after >> > the request. >> >> Python provides os.setuid() and os.seteuid() which wrap the system >> functions. See you systems man pages for these functions for more >> information. > > Thanks -- that was a lot easier than I thought it was going to be. > pass the client's uid in the message to the server like so > > argstring, local_dir, uid = message.split(':') > os.seteuid(int(uid))
I am not sure exactly what you are doing; but, I would advise great caution as messing this up could easily open your system to exploitation. Be very sure that you know what you are doing. -- http://mail.python.org/mailman/listinfo/python-list