setuid and current paths

Dave Harrison dave at nullcube.com
Fri Aug 1 04:24:39 CEST 2003


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