On my old server, I would create a sub domain and set a cron task up for a file on that sub domain. The cron created a text file it used as a lock file to make sure it didn't run 2 at the same time (the cron checks if its running every 5 mins). This was working great.
Now I have moved to the new server, I create my subdomain and set up the cron task BUT the script doesn't have permission to create the text file now. All I want is for that text file to be created successfully without having to give write access specifically like it used to but I can't see what the problem is.
I am running CentOS with Plesk. I was running CPanel (should have kept it :( )
The error I get now is Access denied for user 'apache'@'localhost' (using password: NO)
Can someone help me understand what I need to do.
Access denied ...
bit looks like a MySQL error message to me. What user/group is the cron job running as? What are the permissions/ownership of the directory that you want to create the lock file in?