Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
P is for Practical
 
PerlMonks  

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

( #25123=categorized question: print w/ replies, xml ) Need Help??
Contributed by Anonymous Monk on Jul 30, 2000 at 04:12 UTC
Q&A  > CGI programming


Description:

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.

Answer: How can I check web server permissions for 'cgi-bin' directory ?
contributed by Anonymous Monk

Ask your server admin. short of that try something small like just a print "blah"; or something.

Answer: How can I check web server permissions for 'cgi-bin' directory ?
contributed by pschoonveld

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).
Answer: How can I check web server permissions for 'cgi-bin' directory ?
contributed by Anonymous Monk

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

Please (register and) log in if you wish to add an answer



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others avoiding work at the Monastery: (7)
    As of 2014-04-19 00:54 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      April first is:







      Results (474 votes), past polls