hello all,

I am developing an application for administrating htaccess and htpasswd for protected directories via a cgi script, knowing the circumstances, I'm guessing that I need to run the cgi-script as a user and not 'nobody', tho I'm not too clear on how to go about this, perhaps I'll tell you what I know and then you can pick apart at me.

To run as 'user' the perl script has to be chmoded a special way, though I'm not sure exactly what ;/

To run as this special way, you have to make sure the program is untainted, using the -Taint flag, etc.

This seems all in well, and I've already done some research on various CPAN PMs that might comne in handy. This cgi script will most likelty be in its on protected directory, so no worries there.

I think on my main server, we're using suEXEC, so perl scripts have permissions automagically when they need them. I'm not going to have this on the server I'm writing this app for. I also do not have root access to this server,

Are there any pitfalls that you can see?

 

-justin simoni
!skazat!


In reply to Running a CGI Script as user by skazat

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.