Now when you chmod a cgi script to 4755...are you expecting it to run as any cgi script or not??? because in my case it does not run at all...it should be 755 or 777 to run!!! probably if i can fix this problem and the cgi script executes even if the permission is 4755 this could resolve the problem
suid should make the script run as the scripts owner, no matter who runs it, ie: root.
What security problems if it runs in this mode???
The fact that it runs as root is a security problem in itself. I don't know what your script does, but if it is exploitable, then the exploiter will have root access to your system! As I mentioned, I heartily recommend _not_ making it suid if your server is available over the internet at large...
You have not given any info on what your cgi script does, but the best solution to your problem is to edit the script and see if you cannot make it use a port greater than 1024. If you can do this, then the socket call does not require root privileges.
As for the script not running when suid, perhaps this is the problem:
# This `suexec` module provides the ability to exeucte CGI scripts under
# a different user than apache is run.
LoadModule suexec_module modules/mod_suexec.so
Perhaps you don't have this apache module loaded, in which case the script will not run suid...