S
S
Sergey Khlopov2020-11-01 23:07:06
Apache HTTP Server
Sergey Khlopov, 2020-11-01 23:07:06

Why does the server get a Permission denied error?

Hello, please tell me what could be the problem, I uploaded the site to the server via git clone under the user hlops, set up all the configs, the site works, then I cache the site's view files on this server, change something locally, pull the changes to the server via git, and I get this error:

The stream or file "/home/hlops/www/site.ru/storage/logs/laravel.log" could not be opened in append mode: failed to open stream: Permission denied

Rights and owner/group on the screenshot:
5f9f1486c5864102352655.png
Inside /storage/logs/
5f9f14c598640967454734.png
And if I reset the view file cache and then cache it again, everything starts working, please tell me what could be the problem? Thank you in advance for your response.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
CityCat4, 2020-11-02
@CityCat4

I assume that the log is written by the server? So the user on behalf of which the server is running - you need to give write permissions.
man getfacl
man setfacl

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question