You need 777 if you just want it to work!

4 Read 2 Write 1 Execute ie 5 = R+X (4+1) 6 = R+W (4+2) 7 = R+W+X (4+2+1) 7 5 5 owner group everyone-else

Your CGI will run as the user apache or nobody. So for your script to write to a dir user apache/nobody needs to be able to WRITE to the dir (it will probably be falling into the everyone-else user cat). Assuming you own it (the 7) you either need to change the ownership and or the perms. Something like this will work: chmod -R 777 /path/to/dir/ but is pretty crude. You probably want something like chown you:nobody /path/to/dir && chmod 775 /path/to/dir which will make you the owner, nobody (or apache if req) the group and then give the group write perms. You may want 770 if the data is senstive.

Oh, and the usual text message you have in a die_nice goes like ;-)

Sorry the system is currently unable to fulfil you request due to: 1) Routine Maintenance 2) Unusually high load 3) Transient network hiccups and miscalaneous flatulence 4) Being on strike cause of the 24/7 working hours, low pay and total lack of appreciation from my programmers. .....

cheers

tachyon


In reply to Re: Re: Re: Why does this crash? (Error 500) by tachyon
in thread Why does this crash? (Error 500) by Anonymous Monk

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.