I am running a tracker (CPVLab) hosted on a Lemp Stack The site works fine but there is a problem with a cron job. When the cron job executes I get an error:
2015/08/01 07:00:04 [error] 1303#0: *605 FastCGI sent in stderr: “PHP message: PHP Warning: unlink(/var/www/mysite.com/htdocs/WURFLres//storage/cache/1/3/dfe45504453a9fc3d1ff7a090cd225): Permission denied in /var/www/mysite.com/htdocs/WURFL/Storage/File.php on line 0” while reading response header from upstream, client: 46.101.44.xxx, server: mysite.com, request: “GET /cron-wurfl.php HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9000”, host: “mysite.com”
I set up the cron job using crontab -e as root, no other errors present but I did have issues with ionCube leaders to start with. Can anyone help please. Thanks.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Are you using wget to request the file on crontab?
If so it doesn’t matter if cron is setup as root or any other user as it is Nginx and PHP-FPM executing the file as the web user.
Try changing the ownership of the whole directory:
chown -R www-data:www-data /var/www/mysite.com/htdocs
BINGO problem solved! Thanks for the answers, much appreciated
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.