Answer the question
In order to leave comments, you need to log in
How to correctly assign permissions to the www folder in apache?
Hello. I have an apache web server. Faced such a problem - when executing php scripts, it gave a fatal error. I don't remember it exactly, but there is something with the rights.
I changed the permissions on the www folder: chmod -777 -R /var/www - this helped, but only until I add a new php file, on which I also need to set the permissions with the command above, after which it will be processed by the server.
The question is how to make it so that you do not have to constantly run the command above for roboticity?
What I already tried to do:
- created a php group and set it as the owner of the www folder
- added the www-data user to the php group
It did not help. You still need to run the chmod -777 -R /var/www command after new php files appear in it.
Z.Y. I forgot to say that I am distributing rights 777 since the server is test and local and I didn’t particularly bother with security issues. But in general, if in a nutshell someone chews, as in Feng Shui, I will be grateful.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question