The apprentice requests a checkpoint for his nascent understanding of the placement of where files should be located, at least as far as security practices are concerned...

In Understanding Secure File Organization thread, I asked where library code should go and received several useful comments. In trying to implement these ideas, I've tumbled to a new layout that might be better. I'd appreciate some feedback and constructive criticism:

For the sake of the discussion, let's assume that we're dealing with simple *read-only* database applications (a search using SQL SELECT queries, for example).

With this in mind, what do the Monks think of this directory layout?

virtual server home dir\ | + httpd\ # contains the pages accessed by web (nobody) | + cgi\ +- cfg\ # holds functions to return local config values. +- bin\ # scripts executed by forms +- lib\ # application and toolkit libraries +- data\ # data files

When reviewing the above, please keep the following points in mind

Does this design layout properly incorporate the advice regarding pulling unnecessary files out of cgi-bin?

Have I missed something? Would another approach be more effective? I'm trying to find a balance between strict security and reasonable portability.

What scares me the most about security concerns is what I *don't* know and can't find in the standard FAQs. I can do all the research I want, but eventually, I need to write code.

Thanks in advance...

In reply to Organization Redux by footpad

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.