V
V
Vadim Timoshenko2019-01-09 17:34:09
*nix-like systems
Vadim Timoshenko, 2019-01-09 17:34:09

How to create an FTP user for site files?

There are VPS. I created a bunch of NGINX + PHP FPM + MySQL.
Created a directory for site files /var/www/html/sitename.ru
And everything works successfully.
But I'm stuck on the step - creating an FTP user to access only the /var/www/html/sitename.ru directory
NGINX uses the www-data user to access the site's files. That is, the files are functional only if they have the www-data group and user.
I can't figure out how to create a user that will only have access to /var/www/html/sitename.ru and will create files with the www-data group and user.
I found the manual https://www.dmosk.ru/miniinstruktions.php?mini=vsf...
But there are 2 points. Normal user, and virtual. What do I need? Now there is only root.
Maybe there is some kind of 100% manual on how to create what I need.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Saboteur, 2019-01-09
@saboteur_kiev

In vsftpd you simply tell the user to be locked in his home directory
chroot_local_user=YES
AND create a user whose home directory is the desired folder.
The same can be done via sshd for sftp:
https://passingcuriosity.com/2014/openssh-restrict...

A
Alexey Cheremisin, 2019-01-09
@leahch

Why do you need FTP?! It has long been thrown into the trash (with a rare, very rare, exception)
What did ssh/scp not please?! putty/winscp for those unlucky with the operating system. Create a separate user, include it in the www-data group for example...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question