One of site applications, deployed in customer's webspace does not work. This application utilizes Perl as main scripting language. The following error could be seen in webspace
Premature end of script headers: script.pl
Suexec logs show the following set of errors:
error: directory is writable by others: (/usr/local/pem/vhosts/.../webspace/siteapps/.../cgi-bin) error: file is writable by others: (/usr/local/pem/vhosts/.../webspace/siteapps/.../cgi-bin/script.pl)
Incorrect permissions on deployed site applications. They were set by customer or by incorrectly packaged application.
Suexec is responsible for running Perl and Python scripts on Legacy Linux Shared Hosting. Therefore, at first, check location of Suexec logs via the following command:
# suexec -V -D AP_DOC_ROOT="/var/www" -D AP_HTTPD_USER="apache" -D AP_LOG_EXEC="/var/log/httpd/suexec.log" ...
Suexec logs usually show exact cause of the issue. In this case - incorrect permissions were set on siteapp files and directories. As per OA requirements, permissions
755 should be set on all CGI files inside the webspace. If write permissions are granted to
others, suexec will not execute the script.