First, if he's the sysadmin, shouldn't he have root access?
I think the easiest way to have the script write the files as the sysadmin is to make the sysadmin the owner of the script and run them setuid. (This means the script will be running in taint mode; see perlsec.) Since the sysadmin apparently can't chown files, he will have to make a copy of your script, then you will have to move your script, then he can rename his script and turn on setuid. This may also require some configuration in the web server, however.
If that doesn't work, I guess you can work with a hobbled sysadmin by writing a directory-clearing script that will run as the user www-data that the sysadmin can run.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.