Z.eus

Chiu Yau's Log.

How to run crontab as user:www-data?

Edit crontab with the -u argument to edit a crontab for a specific user:

sudo crontab -u www-data -e

Or, write your entry into the system crontab /etc/crontab, which takes an additional argument specifying the user to run as (usually root, but can be www-data).

*/5 * * * * www-data php /php/script

Leave a Reply

Your email address will not be published.