Frequently Asked Questions

Questions about cgi-bin scripts and how you can get yours to work.

Q: How do cgi-bin scripts work on your servers?
A: For security, CGI scripts run under your own unix user id. This allows you to set extremely secure permissions on your scripts and the data files they work. Your CGI scripts must be placed in your cgi-bin directory which is created for each domain you add to your account.

Our servers refuse to execute scripts with insecure permissions. If your permissions are set so that other users on the system can write to your scripts or the directory your scripts reside in, they will not be executed because your scripts could of been tampered with. Most CGI packages you download will instruct you to set very relaxed permissions on your scripts and data files, but you should not follow these directions.

The most common reason that your CGI script is not executing is that you've set the permissions incorrectly on the script itself, or on the subdirectory that it resides in.

Q: What mode should I set on my cgi-bin scripts?
A: All of your cgi-bin scripts should be mode 700 (user:read/write/execute group:none other:none).

All subdirectories you create inside your cgi-bin directory should be mode 705 (user:read/write/execute group:none other:read/execute).

Q: I am installing a script and the instructions tell me I should use a different mode for my scripts?
A: Don't listen to the instructions. Your script will function correctly with the permissions we've outlined above.

The reason the author of the script is insisting on the insecure modes is that most hosts run an insecure setup where all scripts are run as the web server user and for the script to function properly it needs those modes.

Q: But the instructions insist horrible things will happen if I don't use their modes, are you sure?
A: Really, we know what we're talking about!

Q: I am positive I set the permissions on my scripts correctly, but they just won't run. What's wrong?
A: First, make sure the directories (including the cgi-bin directory itself) are set to mode 705.

Second, if you're trying to run a perl sript, make sure you've got the path to perl set correctly. The path to perl on our servers is located in the Paths category.

Lastly, make sure your scripts are uploaded in ASCII mode and the modification you made to the script before uploading it were made with an ASCII editor like Notepad. You must explicitly set your FTP client to ASCII mode when you upload scripts, since the default is usually binary.