chmod -R 775 storage chmod -R 775 bootstrap/cache
sudo chown -R $USER:www-data storage sudo chown -R $USER:www-data bootstrap/cache
Reference link if giving a permission doesn't solved your issue https://www.digitalocean.com/community/questions/the-stream-or-file-var-www-html-myscipt-storage-logs-laravel-log-could-not-be-opened-failed-to-open-stream-permission-denied