S
S
Stanislav Pochepko2016-01-11 11:43:22
ubuntu
Stanislav Pochepko, 2016-01-11 11:43:22

How to properly set app/storage permissions in laravel?

Good afternoon. I can't figure out why laravel is throwing an error

ErrorException in Filesystem.php line 81:
file_put_contents(/abbaaaba47f19dc00f32157aac163010): failed to open stream: Permission denied

I even set the rights to app/storage sudo chmod -R 0777. And storage/framework/sessionsa new file is created in the folder, but with access rights 644. The repeated procedure does not help. I understand apache2 is running on behalf of www-data. I put the owner on the project folder
sudo chown www-data:www-data -R /var/www/project.local/
and the situation has not changed.
I work on Ubuntu

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
D', 2016-01-11
@DJZT

file_put_contents(/abbaaaba47f19dc00f32157aac163010): failed to open stream: Permission denied

So he tries to write it to the root, and not to storage. Obviously there is a jamb in the way.

V
Vladislav Soprun, 2016-01-11
@soprun

Ubuntu how to create user for webserver?
In general, I'm still running nginx and php, I also upload files from the same user.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question