1. Installation
sudo Install vsftpd
2. Configuration
1) Modify vsftpd.conf
sudo nano/etc/vsftpd.conf
Modify and save in the following format.
#服务器监听listen=yes# Disallow anonymous access anonymous_enable=no# allow local Host access local_enable=yes# Write permission Write_ Enable=yesdirmessage_enable=yesuse_localtime=yesxferlog_enable=yesconnect_ From_port_20=Yesftpd_banner=Co[s] balabalabala.chroot_list_enable=yeschroot_list_ File=/etc/vsftpd.chroot_list# local FTP root local_root=/var/ftpsecure_chroot_dir =/var/run/vsftpd/emptypam_service_name=vsftpd
2.) Set FTP related directories and permissions
$ sudo mkdir -p/var/ftp /upload$ sudo mkdir -p/var/ftp /download$ Span style= "color: #0000ff;" >sudo chmod 755 /var/ftp sudo chmod 777 /var/ftp /download$ sudo chmod 755 /var/ftp /upload
3.) Start VSFTPD
sudo service vsftpd start
Verify that startup is successful
PS grep vsftp
Root 2864 0.0 0.0 4512 1044? S 08:29 0:00/usr/sbin/vsftpd
4) Add group and user and set user password
sudosudo useradd-g ftpgroup-d/var/ftp/upload-m S-ftpsudo passwd S-FTP
5) Edit the Chroot_list file:
sudo nano/etc/vsftpd.chroot_list
The content is an FTP user name, one row per user, such as:
S-ftp
6) Restart VSFTPD:
$ sudo service vsftpd start
Debian/linux Installing and configuring the FTP server