La Erti B La Erti B - 1 year ago 73
Apache Configuration Question

Debian apache www-user to set processes for other users in crontab

i have a php script which enables crontab schedules as www-data. I want to do this from apache but with command -u userx. My question what i have to do in order to give the possibility for www-data user to create crontab jobs for other users?
So far:
1. I created userx and i put it to sudoers file.
2. Also made the sudo chown for www-data to crontab folder. The idea is that i host php file which makes the changes in crontab in apache so the user that changes crontab jobs must be www-data. any ideas?

Answer Source

I suggest use crontab for www-data

sudo -u www-data crontab -e