file access problems

I am running cgi under slinger and want to access certain files from within
the cgi but am having problems. The cgi are compiled c executables and with
them I am trying to access files that are user/group allowed,other
restricted. I believe that slinger sets its own uid to -2 after running and
presumable when it runs the cgi, this runs at the same level. Thus it has no
privilege to see my files. How do I programmatically promote the cgi to
superuser (or at least change the effective uid to match the groupid, note
seteuid() needs root privileges to work) to allow me to manipulate my files.

Any answers would be most welcome

Poseidon

I was looking at the problem from the wrong angle. using chmod a+s on the
cgi executable makes it run effectively as root and my problems are gone.

Poseidon