plesk perl / cgi scripts — permissions!!!

This is a good instruction i found for pemissions

Directory permissions and ownership are important too.

The /var/log/httpd/suexec_log  is the place to look when regular error_log doesn’t show anything…

 

Firstly, make sure you upload the script into the cgi-bin in ASCII mode. This is a problem more oftern then you can imagine. chmod 755 the script. Check permissions are USERID:psacln (the directory should be USERID:psaserv). Of course check that the site has CGI support ticked. You can also verify the syntax of the script by running “perl -c SCRIPTNAME.CGI” and it should report syntax ok.
If you’re still having problems then check the logs. Check /home/httpd/vhosts/DOMAIN/statistics/logs/error_log (some installs my use /var/www/ as opposed to the plesk standard /home/httpd/vhosts) and look for errors. This log file will usually show the error message on the screen. You may also need to check /var/log/httpd/error_log. If you still don’t see the problem then check /var/log/httpd/suexec.log for any

Finally, check the correct suexec version is being used. do an “ls -la /usr/sbin/suexec” and compare that to /usr/local/psa/suexec/psa-suexec. If they are different then make a backup copy of /usr/sbin/suexec to something like /usr/sbin/suexec.orig. then either copy or make a symlink of /usr/local/psa/suexec/psa-suexec into the /usr/sbin directory.

Hopefully this has been helpful.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published.