[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] CGI Wrap on a Raq2



I set all my permissions as 755 and it works fine.

You also have to chown the script to the site, so if the site is, say
site26 do (from the shell logged on as su)

chown httpd.site26 myscript.cgi

I ended up taking the references to cgi-wrap out in the httpd.conf file
and added a scriptalias to  cgi-bin.

So if you want to do this, (logged in as su)

pico /etc/httpd/conf/httpd.conf

and go the the virtual sites settings and add the line:

ScriptAlias /cgi-bin/ /home/sites/locationofmycgibin/ (where
locationofmycgibin is the actual location on your server.)

Then go in and comment out AddHandler cgi-wrapper .cgi and A.pl and put in
AddHandler cgi-script .cgi and .pl.

The whole thing would look like this:

ScriptAlias /cgi-bin/ /home/sites/site26/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl

To comment out a line, put a pound (#) in fron of the line.

Then type /etc/rc.d/init.d/httpd.init stop &
/etc/rc.d/init.d/httpd.init start

if this doesn't work, do a:
cd /etc/rc.d/init.d/ then:
./httpd.init stop &
./httpd.init start

It works for me.

Tom Socha
Technical Services
MoJo Graphics
http://www.mojographics.com

On Wed, 8 Dec 1999, Shaun Masterman wrote:

> Im getting error when I try to run a cgi script from the cgi-bin directory
> of a virtual site, I think this is a 'permissions' issue, but the cobalt
> docs are pretty sketchy on this... Can someone walk me through the process?
> 
> The error message I'm getting is from cgiwrap
> >CGIWrap encountered an error while attempting to execute this script:
> 
> >Error Message: No such file or directory
> >Error Number: 2
> >This message usually indicates there is a problem with the script itself.
> The owner of the script >needs to check the #! line for correctness.
> 
> The #! line matches the output from "which perl" (/usr/bin/perl).
> 
> 1) What permissions should I set on the xxxxx.pl file in the cgi-bin
> directory? -rwxrwxr-x?
> 2) How should I run my perl scripts? using a GET/POST in an HTML page?
> 
> I see from the cgi wrap docs the following :
> "Dont let any untrusted user run a cgi script from the cgi-bin directory..."
> Im a bit of a newbie to all this - please forgive me if Im being a bit naive
> here - I was hoping to be able to just load the .pl files and be able to
> execute them from the cgi-bin for testing...
> 
> Thanks,
> Shaun
> 
> 
> _______________________________________________
> cobalt-users mailing list
> cobalt-users@xxxxxxxxxxxxxxx
> http://list.cobalt.com/mailman/listinfo/cobalt-users
>