简体   繁体   中英

403 Forbidden error using cron and curl

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 ie the folder where my localhost is(I know it isnt safe but this is production purposes).entry in fcrontab:

0 * * * * curl "http://localhost/main/sendmail.php"

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM