in reply to Writing a file as someone else
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.
|
|---|