During the establishment of the FTP host, we need to pay attention to the creation of the virtual host. For a VM, we can apply vsftpd settings. Next we will summarize this part of the programming code.
Virtual Host 。
By default, vsftp does not support setting up multiple ftp sites on the same host as IIS. However, vsftp cannot establish multiple ftp sites on the same host, the method is as follows:
1. Add a virtual IP address (the IP address 192.168.0.10 of eth0)
- ifconfig eth0:0 192.168.0.11/24
2. Create a virtual FTP service user
- useradd-d/var/ftp2-s/sbin/nologin ftp2chmod-R755/var/ftp2chown-R root:root
- /var/ftp2mkdir -m 755 /var/ftp2/pubchown ftp2:root /var/ftp2/pub
3. Prepare the configuration file of the virtual FTP server.
- cp /etc/vsfptd/vsftpd.conf /etc/vsfptd/vsftpd1.conf
4. Modify/etc/vsftpd/vsfptd. conf.
- listen_address=192.168.0.10
5. Modify/etc/vsftpd/vsfptd1.conf
- listen_address=192.168.0.11ftp_username=ftp2local_root=/var/ftp2