Benjamin W
Benjamin W

Reputation: 2848

Mac Laravel file_put_content fail permission problem

I have a project work in laravel (Mac) but I have a problem:

file_put_content fail () Permission denied.

I try below command

cd /path to htdocs
sudo chgrp -R _www storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache

but it's not working anyone know how to solve this problem. I use XAMPP, is that possible to set my XAMPP htdocs folder permission read&write, so I don't need to worry about this anymore

enter image description here

enter image description here

Upvotes: 1

Views: 88

Answers (2)

Chirag Chaudhari
Chirag Chaudhari

Reputation: 1827

you need to provide write access to your storage folder too. try running :

sudo chmod -R 777 storage bootstrap

It will provide read & write and execute permissions to both storage and bootstap folder.

Upvotes: 1

Dilip Hirapara
Dilip Hirapara

Reputation: 15296

It's coming from cache. Delete bootstrap > cache > config.php file.

Then use php artisan config:cache.

Upvotes: 1

Related Questions