CGI script shows 500 Internal Server Error: file has no execute permission

Created:

2016-12-18 06:41:22 UTC

Modified:

2017-08-08 13:44:36 UTC

0

Was this article helpful?


Have more questions?

Submit a request

CGI script shows 500 Internal Server Error: file has no execute permission

Applicable to:

  • Plesk 12.5 for Linux

Symptoms

.cgi script is showing 500 - Internal Server Error

In /var/www/vhosts/system/example.com/logs/error_log following error can be found:

[Wed Nov 23 16:00:05.576389 2016] [cgid:error] [pid 18607:tid 140293764478720] [client 203.0.113.2:41072] End of script output before headers: script.cgi

In /var/log/httpd/suexec_log following information can be found:

[2016-11-23 16:22:00]: file has no execute permission: (/var/www/vhosts/example.com/httpdocs/cgi-bin/script.cgi)

Cause

Incorrect permissions on the file /var/www/vhosts/example.com/httpdocs/cgi-bin/script.cgi .

Resolution

Set below permissions on the script:

# chmod +x /var/www/vhosts/example.com/httpdocs/cgi-bin/test/script.cgi
Have more questions? Submit a request
Please sign in to leave a comment.