A
A
Alexander Arbuzov2018-04-10 14:57:49
PHP
Alexander Arbuzov, 2018-04-10 14:57:49

How to properly configure directories and permissions on the web server?

I set up a server on a bunch of nginx + php-fpm. The server is spinning on centos7
Now there is

  • the nginx user from which nginx runs and, accordingly, the nginx group
  • git user to work with the git server (spinning right there)
  • FTP users for working with code

I plan to place sites in the /web/html/ directory In order to work with this folder, nginx issued rights for the nginx group. Targeted ftp home directories of users to /web/html.
Actually, there are doubts that the rights to the /web/html directory for the nginx group are generally correct. And what about ftp users? Should they also be driven into the nginx group so that they can work via ftp?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2018-04-10
@feanor7

I made a separate group, which included nginx - reading, for the user - writing, if necessary. Or both group entry ... it all depends on the request.

C
CityCat4, 2018-04-10
@CityCat4

man setfacl
man getfacl You
can give permissions to any number of users and groups, they just usually forget about it for some reason. Yes, setfacl is not very convenient. But it is there and you can use it :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question