Skip to main content.
home | support | download

Back to List Archive

Re: Perl Script Downloading?

From: SRE <eckert(at)not-real.climber.org>
Date: Wed Oct 18 2000 - 14:28:44 GMT
At 06:52 AM 10/18/00, ehaymaker wrote:
>What is causing my perl script to start downloading when I call it?

Most likely a permission problem: try "chmod 700" if your FTP client
supports it. Most will not do things like "chmod +x".

I also found I needed "chmod 622" on my log file... to avoid "permission
denied" when the CGI tried to write to disk.

At 06:57 AM 10/18/00, Bill Moseley wrote:
>Not telling your web server that it's a CGI script.

You also need to tell your web server that *.cgi is a script.
I use Apache, and here's my ".htaccess" file:
>AddHandler cgi-script cgi
><FilesMatch "\.(pm|xxx)$">
>order deny,allow
>deny from all
></FilesMatch>
>options +ExecCGI +IncludesNOEXEC 

Note that perl modules (*.pm) are by default downloadable! If you
don't use FilesMatch (or the equivalent in other servers) someone
may guess the name of your module or see an error message that
points to it and download a copy.

SRE

mailto:eckert(at)not-real.climber.org | http://www.climber.org/eckert/
Info on peak climbing email lists mailto:info@climber.org

Amateurs built the ark. Professionals built the Titanic.
Received on Wed Oct 18 14:37:05 2000