M
M
MaxDUB2019-12-07 11:00:40
ubuntu
MaxDUB, 2019-12-07 11:00:40

Ubuntu how to correctly set access rights for FTP and server admin?

Good afternoon!
People please help me figure it out once and for all, otherwise I'm completely confused with these rights.
In general, I set up a VDS server, completely closed access for root and created a user with sudo rights, let's say "userds", specified it in the nginx config, in general, everything works from it.
Now I set up an FTP server and created another user for ftp - "userftp" to which I opened only access via FTP and gave him rights to the /var/www directory with sites.
The question is, how should the rights to this /var/www directory be correctly set now so that the uservds user has rwx rights to it and the userftp user has rwx rights?
What I did
I created a membersvds group and added both users to it and sudo chown -R wuserds:membersvds /path, but in this case I have to give the group write permissions rwx, which is not correct since the group rights should be rx, in general, I'm confused, please explain how to set this whole thing correctly so that both uservds and userftp have write and read permissions to the directory?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MaxDUB, 2019-12-07
@MaxDUB

In general, after looking at a bunch of articles on this topic, where some write like this, others like that (hell you’ll understand how it’s right in the end, because in half of the articles the answers are those who themselves don’t understand this and confusion) came to this:
Return the user nginx and php-fpm - www-data.
And on the /var/www site directory, give the FTP owner rights to the user and www-data group rights Like
this sudo chown -R userftp:www-data /var/www
userftp - rwx
www-data - rx
Is that correct?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question