All files you want to execute must be in a directory that has execute permissions and the file must have its own permissions correctly set as well. This command is what you use to change a files permissions. Verify that the cgi-bin directory is set the same way as well. Every script MUST be in a CGI authorized directory. The web server also has security built it.
Some web servers allow CGI programs to be run anywhere.
Most, however, specify a special directory that is protected from being read or written to from the web. This is to keep someone from uploading their own, perhaps dangerous, program and executing it from a web browser. Conventionally, the directory is called cgi-bin, but it can be called anything that has been registered with the Httpd server. If you are using Icom, it DOES use the cgi-bin directory. Every script MUST have a CGI authorized file extention.