Hi,
You have to give allow the userid under which apache is running (e.g. on redhat linux user 'apache') to be able to read/exec the file.
To activate cgi you have to uncomment the AddHandler directive in httpd.conf, e.g.
AddHandler cgi-script .cgi .pl
and define the physical path of the cgi directory :
ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
You also need :
LoadModule cgi_module modules/mod_cgi.so
and
AddModule mod_cgi.c
in the appropriate sections of httpd.conf . Also you would need something like the following for the cgi-bin directory :
<Directory "/usr/local/apache/cgi-bin">
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
All of the above is for linux/unix but would be very similar for M$ although, obviously, if you are using a windows version of apache the paths above would be rather different.
Hope this helps