Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

How can I check web server permissions for 'cgi-bin' directory ?

by Anonymous Monk
on Jul 30, 2000 at 04:12 UTC ( [id://25123]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

How can I check that my webserver is configured for the directory of where my cgi script lives. Ie. if my webserver is configured for cgi scripts in /cgi-bin and I am calling /bin/perl.

I am getting "Document contained no data" when I call this cgi script from a web page . Links and permissions are all ok, I have checked them, script is also ok.

The error logs on the server are:

"[29/Jul/2000:16:37:08] config: for host ip222.san-francisco25.ca.pub- +ip.psi.net trying to POST /sys_data/cgi-bin/email.cgi, handle-processed reports: no way to service request for /sys_data/cgi-bin/email.cgi"
I believe we are using a netscape web server.

Any help would be appreciated.

Originally posted as a Categorized Question.

Replies are listed 'Best First'.
Re: How can I check web server permissions for 'cgi-bin' directory ?
by Anonymous Monk on Jul 30, 2000 at 19:37 UTC
    Ask your server admin. short of that try something small like just a print "blah"; or something.
Re: How can I check web server permissions for 'cgi-bin' directory ?
by pschoonveld (Pilgrim) on Aug 02, 2000 at 15:25 UTC
    I take it you don't have shell (ssh, telnet, etc) access to the machine.

    The best thing to do is up a simple shell script.

    #!/bin/sh # let the browser handle the data properly (w/o this it will fail) echo "Content-type: text/html\n\n"; # some cheesy data echo "Hello.";
    Also, check with the admin and make sure the permissions are set properly on the cgi script. This can vary wildly from system to system, but a relatively sure best is a+x. FTP might give the perms with an "ls -als" command. in a+x mode, there should be 3 x's (owner, group, global).
      I prefer sending text/plain for the content header when doing tests like this. That way I don't have to worry about nasty less-thans and greater-thans and ampersands.

      -- Randal L. Schwartz, Perl hacker

Re: How can I check web server permissions for 'cgi-bin' directory ?
by Anonymous Monk on Aug 07, 2000 at 09:18 UTC
    i agree with pschoonveld on making sure that the script is exe by all but on some machines you will have to chmod 755 'scriptname'. the hp-ux system that i have dealings with doesnt understand something like chmod a+x 'scriptname' another thing to keep in mind is that when you xfer files to a system you may need to be in ASCII instead of BINARY mode to do the xfer properly you can do this by typing in asciiENTER from the command line - if you do commanline ftping - ftp>ascii (you will then get a message that your are in ascii mode as opposed to binary. i hope that this wasnt a waste of anyones reading time... these are just some things i have found along the way - keeps you from kicking yourself for spending hours debugging when it wasnt you codes fault. oh one last thing... i know Mindspring (a client has his site there) has a book they can send you or an online section for help for this kind of thing... you may want to check with your host for some of this kind of information, but MSpring makes you use this line: use (cgi-lib.pl); -> def. make sure you know which release you are dealing with on the server. s. "do || (!do): try command not found" -/home/yoda/.plan
Re: How can I check web server permissions for 'cgi-bin' directory ?
by Anonymous Monk on Aug 07, 2000 at 09:19 UTC

    Re: How can I check web server permissions for 'cgi-bin' directory ?

    Originally posted as a Categorized Answer.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://25123]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2024-04-20 04:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found