I'm stuck in a Laravel project, I've been using laravel a lot of years and never happened this.
I'm using Vagrant (as always) and only happens this with PHP 8, with other projects with php 7.X doesn't happen.
The USER and GROUP permisions are OK as always. I Ran chmod -R 777 storage and bootstrap/cache a lot of times.
I ran all cache:clear.
I don't know why it's happening this.
Anyone had problems with Laravel and PHP 8?
Thanks!
I resolved it by providing owner permission to apache user:
chown -R apache:apache storage/framework
Please use the following commands:
cd /home/vagrant/code/project_folder_name
sudo php artisan cache:clear
sudo chmod 775 /home/vagrant/code/project_folder_name
sudo chown -R vagrant:vagrant /home/vagrant/code/project_folder_name
Hopefully, it will solve your issue.
Can you please try with the given permission, as it should be on web server group www-data level as well?
Also, adding a link for your reference.
https://linuxhint.com/how-to-set-up-file-permissions-for-laravel/
sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache