perl scripts does not work


i move one of our domain to a new server with CentOS 5 64bit and Virtualmin Pro (installed with automatic script from this website) and it works except the perl scripts. I receive the following error in apache error log:

suexec failure: could not open log file, referer:
fopen: Permission denied, referer:
Premature end of script headers: bnbform.cgi, referer:

suexec gives:

> suexec -V
-D AP_DOC_ROOT="/home"
-D AP_HTTPD_USER="apache"
-D AP_LOG_EXEC="/var/log/httpd/suexec.log"
-D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin"
-D AP_USERDIR_SUFFIX="public_html"

the permissions on the scripts i’ve set like at the old server (755). Can you help me please to make it work.

Thank you

Walter Bär

You’ve fallen prey to the “too much permission” problem, discussed in our troubleshooting common problems guide found here:,troubleshooting_common_problems/#internal_server_error

In short:

chmod 750 *.cgi

Thank you Joe for your fast answer. I’ve changed the permissions of the scripts (incl. to 750. run when i call it directly but the other scripts does not, same error. Where should i look at next?

Walter Bär

Hey Walter,

It’s hard to say. Once permissions are fixed, we’re on to debugging the script.

Check the error_log for that virtual server (in ~/logs), as well as the suexec log (usually in /var/log/httpd or /var/log/apache2, depending on platform).

Make sure the scripts actually run from the command line–they may have path errors or something else that leads to compilation errors.

Did you set your file owner and group correctly?

I found the error, now all the scripts work. I copied the scripts first with Total Commander and forget to set *.pl and *.cgi in the commanders config to auto transfer mode ASCII. I’ve redownloaded, edited and copied the scripts and now all ok.

Thank you for your help!

Walter Bär