M
M
Maxim Zolotoy2020-06-12 12:00:48
linux
Maxim Zolotoy, 2020-06-12 12:00:48

How to set root folder for FTP user?

I'm trying to learn how to configure VDS
So I created a new user and specified the root directory for him /home/user
Installed the service apt-get install proftpd

Now when I connect via FTP I get into the directory /home/user
How can I make it so that I get into the directory /var/www/userwhen connecting via FTP?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sanes, 2020-06-12
@Sanes

Why not immediately specify /var/www/user
but in general, something like this

ftpasswd --passwd --file=/etc/ftpd.passwd --name=leader --uid=600 --gid=600 --home=/home/bitrix/ext_www/bitrix.loc/ --shell=/bin/false

V
Victor Taran, 2020-06-12
@shambler81

yum -y install epel-release 
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
yum -y update
yum install -y proftpd openssl proftpd-utils
systemctl start proftpd.service
systemctl enable proftpd.service
adduser site.ru -g600 -o -u600 -d /home/bitrix/ext_www/site.ru
firewall-cmd --add-service=ftp --permanent
firewall-cmd --reload

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question