Oh, but I guess this is a little security improvement, not?
But now... another related question.

If the shebang line is not needed by the web server (if I will define an
action to run perl in httpd.conf), is the shebang line used for something
else?

I've tried chmodding the perl script to 755, and I've tried running it with:

$ script.pl

...but it didn't want to run, telling me that there is no command script.pl,
even though the script has a shebang line in it.

Oh, do you know if I can specify the action for running .pl files and .cgi
files with perl in a .htaccess file?

Thanks.

Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]

----- Original Message -----
From: "Kristofer Hoch" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 11, 2003 5:04 PM
Subject: Re: Why executable?


This is what I do for security on my webserver.  I don't have the
shebang line in my scripts.  The webserver has a list of approved perl
script extensions.  When it runs across a file with this extension, the
web server executes it with perl.  Otherwise, it treats the file as if
it is text/html.

Kristofer.
--- zentara <[EMAIL PROTECTED]> wrote:
> On Mon, 11 Aug 2003 11:33:40 +0300, [EMAIL PROTECTED] (Octavian
> Rasnita)
> wrote:
>
> >Hi all,
> >
> >Does anyone know why the perl scripts need to have the execute
> permission
> >under Unix?
> >
> >I am asking this because I've seen that the PHP files don't need
> this
> >permission.
> >
> >Couldn't perl just read a text file (doesn't matter if it has an
> execute
> >permission or not), interpret it and execute it just like PHP does
> with its
> >programs?
>
> perl scripts can be done the same way
>
> You can take any perl script, and remove the shebang line, chmod it
> to
> 644 , and run it like "perl scriptname"
>
> The way PHP is setup, the PHP interpreter is executable and calls
> it's
> readonly scripts.
>
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


=====
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GIT d s+:++ a C++ UL++ US+ P+++ L++
W+++ w PS PE t++ b+ G e r+++ z++++
------END GEEK CODE BLOCK------

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to