I have a cron job that I want to run at 12:01 every night to update all the records in one filed of a table in a database. Currently I am getting an error when the cron job runs saying permission denied. Here is the exact text of the error (with the path changed):
/bin/sh: /xxxxxxx/homepages/33/xxxxxxx/htdocs/xxxxxxxx.php: Permission denied
This is how I have it set up:
the cron job calls the php file.
I have an require once in the php file to connect to the database
then the php file runs
I suspect that the permission denied error is coming because the user name is the username of the database, not the root user of the shell. Do I need to add a user login to my php file for the shell access? If so, how would I go about doing that?
I know the php file is running correctly because when I run it manually, it does what I want it to do.