I
I
irbisik2014-09-26 18:06:26
Nginx
irbisik, 2014-09-26 18:06:26

How are the site folder rights set for the www-data user?

I’ve been sitting for 2 hours thinking how to do it right, you need to set the rights of the folder.
There are 2 users www-data and ftp.
How to make it more correct, so that FTP could set the rights or create a file and so that the security would not suffer?
The www-data user has set the www-data group to the folder
/var/www/
The FTP user has been placed in the www-data group and set group rights to the folder / The
cmod 770 /var/www/
question will be correct in this scenario with several sites?
/var/www/site.ru
/var/www/site2.ru
/var/www/site3.ru
I'll reformulate the question what rights for www-data should be set on the folder with sites I think that these will do?
chmod -R a-rwx,u+rwX,g+rX /var/www owner and group www-data.
How to make ftp user with the same rights as www-data without group intervention?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
Xisp, 2014-09-27
@Xisp

Can create a user for each site and give them access to sFTP (prohibiting ssh)?
Then the files themselves will be recorded with the user and group of the site.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question