How should the rights be configured so that the site can properly write data to its configs in document_root.

Worth nginx + php-fpm. Nginx works from the user www-data.

All site files belong to the user rayzor and the same group, which is logical.

This user will log in via ssh and clone the repository on its own behalf.

What after and before each git pull to change the owner and rights? Or put on the files right 777? This is also wrong. Or put to nginx Worked from the user rayzor?

Which option is normal? So to say, not to be ashamed before pokemon

  • Good Lord, what a nightmare. Why go to the FTP and how do you use the "clone repository"? - strangeqargo pm
  • ok, did not finish a letter ... sftp, and I clone on ssh. - Edward
  • you still did not describe the problem. Do you have a git repository and some kind of nginx, how do they intersect with each other? In theory, your git should not be accessible via nginx / apache / etc., you knock on ssh, clone it. Can you update and clarify your question? - strangeqargo pm
  • where is git here? We have set up and configured a server from root, set up a virtual host. Then they created a user, logged in under it and uploaded a website to the server, which is given by the server. Naturally, the files uploaded by the user are the owner and the group is this user, and in order to edit the files to the user - these are exactly the rights needed, respectively. The site itself rules these files can not. File permissions are as follows: rw-rw-r. How to make the user write to files and nginx that works from the user www-data. - Edward
  • The bottom line is that the file and the user and group one and the same, and two users need to edit the file. - Edward

0