W
W
WeReng2016-06-15 21:09:57
linux
WeReng, 2016-06-15 21:09:57

How to properly set permissions on Ubuntu webserver?

Hello! Please help me understand the permissions.
The server has a user and group server.
The server has nginx installed and all sites are in the /home/server/htdocs directory. Nginx runs under the www-data user. The www-data user has been added to the server group. Also, proftpd is installed on the server, the sites are powered by wordpress. The rights to directories are 755, to files 644.
The problem is this: when updating, wordpress asks for a login password from ftp (I have ftp by key), but I would like it not to do this. This can be solved by changing the ownership of /home/server/htdocs to www-data:www-data, but then via FTP I can't change files, since the FTP user is server.
Please tell me how to most competently solve this problem so that WordPress is updated without requiring an FTP password and you can easily change files via FTP.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
intelligence, 2016-06-15
@WeReng

If Apache is behind nginx, then google towards apache2-mpm-itk, if php-fpm, then run it on behalf of the desired user (server in this case). Accordingly, if isolated sites are needed, then Apache \ nginx is launched from a unique user for each site. And there will be no problems with ftp.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question