Hello again:

Using Log::Log4perl, I'm getting errors in the browser looking like this:

There has been an error: Cannot write to '/var/log/apache-ssl/dpr.log' +: Permission denied at /usr/local/share/perl/5.8.7/Log/Dispatch/File. +pm line 86.
Although, when I su - www-data (my apache user), I am able to update the last modification date with the touch command and use vim to edit the log file, as well.

Can anyone here please advise why my log file would be inaccessible to this web application?

-- Hugh

UPDATE

Thanks to Mike Schilli (a responsive package maintainer who monitors and rapidly responds to his support list), I was reminded that the webuser also has need of write permissions on the directory above the log file as well. I moved my log to a directory created for this purpose in /tmp and things started working. I'm adding to my to-do list figuring out how to get these logs out of the /tmp directory without exposing other file heirarchies to the exposure of a webserver writing to them. But for the moment this has me moving on this project again. Thank you Mr. Schilli!


In reply to Log::Log4perl write permissions by hesco

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.