Setting up PHP cron jobs to run as each user account
I'm trying to figure out the best way to solve this issue.
An account is trying to set up cron jobs tasks that will use PHP scripts with mkdir.
The issue is this returns a permission denied. I know I can resolve this by setting a root cron job on the server for the account but is there a simple way to set each user accounts cron job that runs PHP to run as each user account so it can create, delete, directories easily?
-
Make sure that that they use the dirname(__FILE__) or __DIR__ in the input for mkdir. And that the cron job is run with the correct path. 0 -
Make sure that that they use the dirname(__FILE__) or __DIR__ in the input for mkdir. And that the cron job is run with the correct path.
Thank you for leading me in the right direction. I checked the path where it was trying to mkdir and it was the incorrect path :eek:. After correcting it, working perfectly.0 -
Thanks for the tip, @ThGe !!! 0
Please sign in to leave a comment.
Comments
3 comments