In order for normal users to receive access to restricted files, it must be the case that only certain authorized "normal" users are to be granted this access -- otherwise, the restricted files might just as well be in any old non-restricted location.

So, if you are managing a list of "authorized normal users", it will be best to have two separate processes: one can be run by normal users and does nothing beyond expressing a request from a normal user to receive one or more restricted files; the other is run only by an admin account, and services these requests from normal users, by checking the authorization list, confirming whether the given user is authorized to receive the requested file(s), and either providing the files or not, depending on what the authorization list says.

But then, you might also have to worry about how you convey the restricted files to recipients, and whether the recipients have the sense and wherewithal to protect the files from unauthorized exposure to others.

The one thing you certainly do not want is for normal users to autonomously use some process that allows admin-level access of any sort. That's asking for trouble.


In reply to Re: perl script to copy files as admin by graff
in thread perl script to copy files as admin by GreenWitch

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.