Use vsftpd code to create a VM

Source: Internet
Author: User

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)

 
 
  1. ifconfig eth0:0 192.168.0.11/24 

2. Create a virtual FTP service user

 
 
  1. useradd-d/var/ftp2-s/sbin/nologin ftp2chmod-R755/var/ftp2chown-R root:root 
  2. /var/ftp2mkdir -m 755 /var/ftp2/pubchown ftp2:root /var/ftp2/pub 

3. Prepare the configuration file of the virtual FTP server.

 
 
  1. cp /etc/vsfptd/vsftpd.conf /etc/vsfptd/vsftpd1.conf 

4. Modify/etc/vsftpd/vsfptd. conf.

 
 
  1. listen_address=192.168.0.10 

5. Modify/etc/vsftpd/vsfptd1.conf

 
 
  1. listen_address=192.168.0.11ftp_username=ftp2local_root=/var/ftp2  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.