perl scripts does not work

Hello,

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: http://www.lumatron.ch/feedback.htm
fopen: Permission denied, referer: http://www.lumatron.ch/feedback.htm
Premature end of script headers: bnbform.cgi, referer: http://www.lumatron.ch/feedback.htm

suexec gives:

> suexec -V
-D AP_DOC_ROOT="/home"
-D AP_GID_MIN=100
-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_UID_MIN=500
-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

BR
Walter Bär

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

http://www.virtualmin.com/documentation/id,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. awstats.pl) to 750. awstats.pl run when i call it directly but the other scripts does not, same error. Where should i look at next?

BR
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!

BR
Walter Bär