ftp server construction-installation, configuration and verification
#Install
sudo apt-get install vsftpd
#Configuration File
cat > /etc/ << "EOF" listen=NO listen_ipv6=YES anonymous_enable=NO local_enable=YES write_enable=YES dirmessage_enable=YES use_localtime=YES xferlog_enable=YES connect_from_port_20=YES chroot_local_user=YES chroot_list_enable=YES chroot_list_file=/etc/vsftpd.chroot_list secure_chroot_dir=/var/run/vsftpd/empty pam_service_name=ftp rsa_cert_file=/etc/ssl/certs/ rsa_private_key_file=/etc/ssl/private/ ssl_enable=NO local_root=/home/test #Requires to create the corresponding root dirEOF
#Create a user
echo test > /etc/vsftpd.chroot_list
#Set password
password test
#Create home directory
mkdir /home/test sudo chmod -R 777 /home/test touch test #Put a test file
#Local Verification
root@localhost:/home/ftp# ftp localhost Connected to localhost. 220 (vsFTPd 3.0.5) Name (localhost:root): test 331 Please specify the password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> dir 200 EPRT command successful. Consider using EPSV. 150 Here comes the directory listing. -rw-r--r-- 1 0 0 13 Nov 24 15:46 test 226 Directory send OK. ftp> get test local: test remote: test 200 EPRT command successful. Consider using EPSV. 150 Opening BINARY mode data connection for test (0 bytes). 226 Transfer complete.
This is the article about ftp server construction - installation, configuration and verification. For more related ftp server construction content, please search for my previous articles or continue browsing the related articles below. I hope everyone will support me in the future!