I am getting this error from time to time on the aws linux server after clearing cache as well
Exception: Unable to create lockable file: /var/www/slimmed-portal/slimmed-laravel-portal/slimmed-webapp/storage/framework/cache/data/7c/03/7c03173b86fb6f8da70a851cb194864a4eec0df4. Please ensure you have permission to create files in this location.
I tried below things to resolve the error
sudo chmod -R 777 storage/framework/cache/data
chown -R apache storage/framework/cache/data
sudo chmod -R 777 bootstrap/cache
chown -R apache bootstrap/cache
And after clearing the cache it still comes back in like 1 or 2 days later:
php artisan optimize:clear
Can anyone provide a proper solution to this error? It would be very helpful.