There is a perl(cgi) script is intended to send which contains attachments which were previously stripped. It goes through all the e-mails residing in /attachments/new/. It searches through each e-mail for description: name of the receiver, date, sender, subject. It then prints these details so that admin/user has the ability to search or has the ability click on the check box beside the details and submit so that these emails then can be send to the destination. The problem that I am facing is that when I try to read the emails in /attachments/new/, I am faced with this error :
Can't open /attachments/new/ Permission denied at /usr/lib/attachmaster/cgi/testhtml2.cgi line 64.
So I reset my permission to my script appropriately. In that case, the script is able to open up the emails and read the files in the directory. However, when the check box is clicked and submitted, the following error message shows up:
Insecure $ENV{PATH} while running setuid at /usr/lib/attachmaster/cgi/testhtml2.cgi line 247.

In reply to Insecure $ENV{PATH} by kanabrian

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.