I'm having problem in setting up Laravel 4. I'm having this error when opening the index page:
file_put_contents(/Users/laravel/app/storage/meta/services.json) [function.file-put-contents]:
failed to open stream: Permission denied.
What am I missing here?
I think chmod -777 is a bad practice.
To solve permissions issue on Laravel, I've done this (with root user):
cd app/
chown -R www-data:www-data storage
cd storage/
find . -type d -exec chmod 775 {} \; && find . -type f -exec chmod 664 {} \;
And always in app/storage directory :
chown your_user:user_group .gitignore cache/.gitignore logs/.gitignore meta/.gitignore sessions/.gitignore views/.gitignore
Now, exit the root user, and it's ok.
EDIT : this was for Laravel4. This doesn't works for Laravel5 because of a different structure.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With