Anybody knows that??? - creative with crontab

Hi,

I have a client asking quite some questions. I don't know what to answer to this one.

He is asking if it is possible to use the /usr/bin/crontab to programmatically add/remove entries. Just a basic system('/usr/bin/crontab /path/to/my/crontab_file').

He is referring to user account crontabs. And what he need to do is have them edited by a web-based program. This is not something he need to set up once (through the shell, or the CPanel interface).. but something that needs to be edited automatically by the web-program.

For instance, if he were logged in as user 'sporskto', and ran "crontab somefilename", this would set up a crontab entry for his user account (to be run as my uid/gid). Now if all cgi program are being run as the gid/uid of the webserver, unning "/usr/bin/crontab" with a system call from the Perl/PHP program would set up an entry for the web server user ('httpd' i'm assuming).

Would you recommend me to allow him to do this? If not, why? Hope that someone has an answer to this one.

Thanks
John

 

 

 

 

Top