Portal Home > Knowledgebase > Server Management > Troubleshooting CGI/PERL scripts


Troubleshooting CGI/PERL scripts




This article provides some basic troubleshooting steps to follow for CGI and Perl scripts.

Troubleshooting Tips

Paths

Executable scripts should be in your cgi-bin by default and for security.

  • /home/00000/domains/example.com/cgi-bin/

Make sure that all modules and include files required by your script have been uploaded to the server and are in the locations called by the script.

Ownership and permissions

Your script, and any files it includes, must be owned by the administrative user for the domain that uses it. If you uploaded the script using FTP, it probably has the correct ownership already. However if, for example, you extracted the script from a backup made on another server, it may have the wrong ownership. Here is the correct ownership and group for your files:

  • serveradmin:serveradmin

Use the chown command to change the permissions on your files. Example:

chown serveradmin:serveradmin myscript.pl

If your script belongs to the wrong owner and you receive a "permission denied" error after running the above command, you will need to open a support request in your Client Area.

Your script must be executable. 700 permissions are generally recommended in this case. The domain user, at least, must have execute permissions.

chmod 700 myscript.pl

Your script and any files it uses must NOT be group or world writeable; e.g. 777 permissions are NOT recommended.

Permissions for the cgi-bin MUST be 755. Here is an example for setting permissions to 755 on the Grid (replace 00000 with your site number and example.com with your domain):

chmod 755 /home/00000/domains/example.com/cgi-bin/


Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article


Powered by WHMCompleteSolution