crontab wget works but throws permission error
Im using a cron tab every 1 minute to test if it works via the following command:
wget http://www.site.com/cron.php
which works great but on my email i get the following response:
Resolving www.site.com... 11.11.11.11
Connecting to www.site.com|11.11.11.11|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 0 [text/html]
delete_tut_viewers.php: Permission d开发者_StackOverflowenied
Cannot write to `cron.php' (Permission denied).
so can i leave it like that or do i have to check for another solution?
thanks.
Try adding it to the root crontab (sudo crontab -e
) or change permissions of the directory where you want to store wget's result (by default wget
wants to store the contents of the file it gets to its current working directory).
精彩评论