My Apache runs as user "nobody", so whatever user your Apache runs as will need "r"ead access to the file you're trying to open. I'M NOT CERTAIN about this, but I think that if you want to grant the webserver(cgi script) read access to a file, and the absolute path to the file is
/path/to/read_file.html
then
directory 'path' needs to grant read and execute privs to the webserver user, and directory 'to' needs to grant read and execute privs to the webserver user, and file read_file.html needs to grant read privs to the webserver user.
I think(?) the directories need to grant 'execute' privs to enable descending into those directories. On my system I tried this with 'root' owner and 'root' group owning all files and directorys under /path - so to allow webserver user "nobody" to be able to read /path/to/read_file.html, I had to do
chmod o+rx /path chmod o+rx /path/to chmod o+r /path/to/read_file.html
HTH.

In reply to Re: Re: Confusion opening a file by hmerrill
in thread Confusion opening a file by Hammy

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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, details, 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, summary, 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.