I have a script that calls an API and, grabs photos and saves them to the server. It works wonderfully if I execute it from SSH. But when it's running as a Scheduled Task, I receive a failed to open stream: Permission denied
This is what I'm running as my scheduled task:
/usr/bin/php /var/www/vhosts/mywebsite.com/laravel/artisan get_photo
Again, running this script as php artisan get_photo
from Terminal through SSH works wonders. I can't figure out why I would be getting Permission denied
when it's being run as a Scheduled Task.