I've tried a range of combinations for adding a cron job. I can't tell if there is a problem with my cron command, or if it's something about the users on the server. Currently I've added this cron to run under sudo. I'm confident the path to php and path to my cron are correct, and when I visit that cron.php file it stores the time() in a log so I know that part works... also permissions are 755 on the cron.php file.
*/1 * * * * /opt/bitnami/php/bin/php /opt/bitnami/apache2/htdocs/cron.php cron:run
I've tried adding this cron using sudo crontab -e, sudo crontab -u root -e, crontab -e. I've also tried combinations where the user is state in the cron command like:
*/1 * * * * sudo /opt/bitnami/php/bin/php /opt/bitnami/apache2/htdocs/cron.php */1 * * * * root /opt/bitnami/php/bin/php /opt/bitnami/apache2/htdocs/cron.php */1 * * * * bitnami /opt/bitnami/php/bin/php /opt/bitnami/apache2/htdocs/cron.php
So far no combination works, and there are no errors in the server log.
I've tried restarting cron with sudo /etc/init.d/cron stop, sudo /etc/init.d/cron start. The start/stop works so I'm sure cron is running... but I'm not sure if cron runs as "root", "sudo" or "bitnami"?