Basic CGI problem

I’ve got a script that I’m trying to install in my site. It has an install.cgi file that needs to run from the document root. However, when I run it, I get an error. The error log isn’t helpful, and the access log just shows an error 500 was returned.

I’ve got 777 perms set to the file and the folder. I even changed the name to, but I get the same results.

What’s required to get cgi scripts to run?

I searched the wiki and it shows an example of a small script used to display what perl modules are installed. I copied it and pasted it into a new file named and set it up according to the instructions given there. It does the same thing as my install script. There’s something very basic that I’m probably missing.

Any ideas?

(I posted a support ticket here about 12 hours ago, but have not yet received any reply.)


Bzzzt! Try again. You’ve got the wrong permissions. For obvious security reasons DreamHost will not run CGI scripts that allow public write access on either the CGI file or the directory its located in. Use 755 instead.

:cool: [color=#6600CC]Atropos[/color] |

Bzzt. Tried that, too. It doesn’t help.

Set root dir perms to 755. Doesn’t help.

This is what my error log shows:

[Sat Apr 07 13:11:53 2007] [error] [client] failed to open log file
[Sat Apr 07 13:11:53 2007] [error] [client] fopen: Permission denied
[Sat Apr 07 13:11:53 2007] [error] [client] Premature end of script headers:

This is for the script example here:

In addition to the root dir, the dir the script is in , and the script itself, must also be 755.

Your error log does in fact have some useful info. The failure to open the log file is a clue, and the premature end of script headers could be lots of things (just google).

Well, if you tried to run that script from a browser, that explains the last error on your log - that is not a script that implements CGI, and as such is not runnable from a browser as it sits - see the article you referred to where you got the script - it tells you how to run it (from the command line in the shell)

Why don’t you just tell us what script you are trying to install, so we can be of more help?


except that there’s no log file being created by this program, and the entry isn’t saying who’s trying to create it. (I got this same error on a system with a Plesk control panel, and the hosting guys finally discovered it was because the system was creating another file with the wrong userid, so it generated an error on the su_exec.log file, which caused the exact same error to be displayed as here. Only in that case, it at least showed the name of the log file it was having trouble with.)

Yeah, I see it a lot. Once I got the perms fixed on another box, I was able to run this script just fine. It installs a bunch of other stuff. The problem was that I couldn’t get the other stuff to run on that machine.

This script has been used by hundreds of people this week to install this app. The problem is that it was developed to work primarily under defaults that cPanel uses. Two people referred me to DreamHost and both said that cPanel is used here. After signing up, it appears that it’s not. So now I’ve got to keep slogging through all these weird issues until I can get the script to work.

The only thing that needs to be changed in this script is the first line that tells where perl is located. I found something on the wiki that says it’s in /usr/bin/perl, but I’m not totally convinced of that.

I put this info in the support ticket I submitted. I’m still waiting for a reply. It’s a brand new product that was released this past Tuesday to a few hundred people, called JVM2 Fantasos. Does that help?


Unfortunately not (rats! :frowning: ). I was hopeful that it was something I could take a look at, and attempt to install myself in hopes of helping identify the problem and help you find a solution.

After googling the product, I see that that will not be possible…hey, it was a thought! :wink:

Good luck with it; I hope you are able to get it working.