开发者

403 Forbidden error using cron and curl

开发者 https://www.devze.com 2023-02-14 07:49 出处:网络
I have an fcron job to run a php script in the background and the output is written into a file. However the only outout I get is a 403 forbiden error. My fcron is working but it does not have access

I have an fcron job to run a php script in the background and the output is written into a file. However the only outout I get is a 403 forbiden error. My fcron is working but it does not have access to my localhost. How can I make sure that fcron job has access to localhost? I am the owner of localhost i.e the folder where my localhost is(I know it isnt safe but this is production purposes).entry in fcrontab:

0开发者_StackOverflow中文版 * * * * curl "http://localhost/main/sendmail.php"


Got it. Create the fcrontab as super user aka su. SU has permission to everything.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号