The following guide describes how to install ftp vsftpd server in Debian system 11.
We will do everything from the terminal by executing a few simple commands.

The first step is to run the terminal or log in to our server via ssh and install:

sudo apt install vsftpd -y

We run it in the system:
sudo systemctl start vsftpd
sudo systemctl status vsftpd
systemctl enable vsftpd.service

We add a new user to the system:
sudo adduser testowyftp

We add to the program configuration:

echo "testowyftp" | sudo tee -a /etc/vsftpd.userlist

We create a directory for user files:
sudo mkdir -p /home/testowyftp/ftp_directory
sudo chown nobody:nogroup /home/testowyftp/ftp_directory
sudo chmod a-w /home/testowyftp/ftp_directory
sudo mkdir -p /home/testowyftp/ftp_directory/ftp_data
sudo chown testowyftp:testowyftp /home/testowyftp/ftp_directory/ftp_data
cd /home/testowyftp/ftp_directory/
chmod -R 777 ftp_data

We do a backup of the ftp configuration file
sudo cp /etc/vsftpd.conf /etc/vsftpd.conf.bak

We edit the file and make changes:
nano /etc/vsftpd.conf


We will change as follows:

anonymous_enable=NO
local_enable=YES
Oraz ustawiamy w tym samym pliku:
listen=NO
listen_ipv6=YES
anonymous_enable=NO
write_enable=YES
local_umask=022
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
chroot_local_user=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
user_sub_token=$USER
local_root=/home/$USER/ftp_directory
userlist_enable=YES
userlist_file=/etc/vsftpd.userlist
userlist_deny=NO

We reload the ftp server and check the service:
sudo systemctl restart vsftpd
sudo systemctl status vsftpd

That's all, we should now log in correctly to ftp on the test user ftp.

the server for this guide was provided by statnet.pl https://www.statnet.pl/vps/root-vps/

We select Yes and click enter:

About WordPress

Zobacz komentarze

  • It works fine but: forget about securing the ability of the ftp client to enter the root directory after connecting via ftp, and this cannot be, because all system files are available. I'm going to change that , where to put DefaultRoot~ ??

Najnowsze wpisy

Installing Laravel on servers with DirectAdmin panel

Installing Laravel on servers with DirectAdmin panel: poniżej bardzo prosty sposób na instalację na naszych

6 months temu

Deletes all .listing files in a given folder and subfolders

Below is a very simple trick to delete all .listing files from directories and their subdirectories. użyjemy

6 months temu

Checking the temperature of raspberry pi

The guide below shows how to check the temperature in the Raspberry Pi in just a few seconds. Polecenie

6 months temu

Full Debian Installation 12 For beginners

Today we will introduce you to the first tutorial on how to install Debian. We will show you throughout the series, w jaki sposób

11 months temu

Checking the operating frequency of the Raspberry PI CPU

The following method describes a very simple way to check the operation of the CPU frequency of our Raspberry PI. Całość

1 year temu

Recursive change of file permissions on Debian

Recursive change of file permissions Go to the directory for which we want to change permissions (np public_html)…

1 year temu