I don't think this will be able to help you, since if your PHP script is running as user nobody, it will only be able to edit nobody's crontab, which runs with the permissions of -- you guessed it -- nobody. There are a couple of ways around this whole problem:
-- run PHP as a CGI with seExec as opposed to an Apache module (this is what I do on a couple of my Web hosting servers).
-- create a small C program in /usr/local/bin (or whatever directory you have as your PHP safe_mode_exec_dir in PHP) that's setuid to your user and does what you need to do, and have PHP invoke it (e.g. via a popen call to capture output).
-- redo your permissions so that the user Apache is running under has permissions to read what it needs to read.
Or are you saying you would edit crontab as yourself and have your crontab call the PHP script? This would probably work, but that wouldn't help people trying to access the page through your Web server.
|