Reputation: 11961
I am trying to run an existing Laravel project on my localhost but when I try to run the dam thing I get this error:
The stream or file "/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied
I have tried the following:
chmod -R 775 storage
and chmod -R 777 storage
Still nothing, I have even tried to do chgrp -R www-data my-project
and I get this error in terminal
chgrp: www-data: illegal group name
What am I doing wrong?
Upvotes: 5
Views: 20475
Reputation: 1384
Navigate to the project directory and run
sudo chmod -R 777 storage/*
Upvotes: 23
Reputation: 6011
First you need to run php artisan cache:clear
from the project directory, then chmod -R 777 app/storage
and finally composer dump-autoload
and now it will be working fine..
illegal group name actually means that the group you're specifying(after www-data going username).You need to either create the group, stop specifying a group, or specify a group that exists.
Upvotes: 7