setuid and current paths

Dave Harrison dave at nullcube.com
Fri Aug 1 04:59:32 CEST 2003


hi again,

Im clearly a moron, and have solved the problem myself, due to a wish
to avoid dire embarrasment I shall not reveal the stupid mistake I made ;-)

Apologies for the inconvenience
Dave

> hi all,
>
> Im using the setuid-prog.c script to setuid my cgi script.
> The C script is chowned to "myuser" (not root, I dont need root access
> just the access myuser has).
> 
> However when I do this, the path it executes the script from is not
> the same dir as the cgi itself.
>
> My CGI script uses a dir structure within its own dir, but when
> I execute it from another dir (via the setuid script) Im not
> in that dir natively.
> 
> Ive tried chdir without success, and chroot runs me into a permissions
> problem.
> 
> Anyone want to tell me how I _should_ be doing this ?





More information about the Python-list mailing list