Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

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

by Anonymous Monk
on Jul 30, 2000 at 04:12 UTC ( #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


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 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 (; -> 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!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            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?

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

    How do I use this? | Other CB clients
    Other Users?
    Others about the Monastery: (4)
    As of 2020-08-08 03:57 GMT
    Find Nodes?
      Voting Booth?
      Which rocket would you take to Mars?

      Results (51 votes). Check out past polls.