(reprint) Build Apache Ftpserver on Windows

Source: Internet
Author: User

Because of the work needs, recently frequently contacted the FTP, today I come to introduce an open source FTP server, that is Apache Ftpserver,apache ftpserver is a 100% pure Java FTP server. It is designed to be a complete and portable FTP Server engine solution based on the existing open protocol. Ftpserver can be run standalone as a Windows service or Unix/linux daemon or embedded in a Java application.
Next, let's look at how to install Apache Ftpserver in a Windows environment:

First step: Download Apache Ftpserver

Can be downloaded to the official website: http://mina.apache.org/ftpserver-project/downloads.html is currently the latest version of Apache Ftpserver 1.0.6 release, What I'm downloading here is the 1.0.6 version

Step two: Extract Apache Ftpserver

Unzip the downloaded compressed package to the local, mine is placed in the D packing directory, its directory structure such as:

Step Three: Modify the configuration file 1. Modify D:\apache-ftpserver-1.0.6\res\conf\users.properties This file

In this configuration file, you can increase the user

# Password is "admin"
Ftpserver.user.admin.userpassword=admin
Ftpserver.user.admin.homedirectory=./res/home
Ftpserver.user.admin.enableflag=true
Ftpserver.user.admin.writepermission=true
Ftpserver.user.admin.maxloginnumber=0
Ftpserver.user.admin.maxloginperip=0
Ftpserver.user.admin.idletime=0
Ftpserver.user.admin.uploadrate=0
Ftpserver.user.admin.downloadrate=0

ftpserver.user.anonymous.userpassword=
Ftpserver.user.anonymous.homedirectory=./res/home
Ftpserver.user.anonymous.enableflag=true
Ftpserver.user.anonymous.writepermission=false
Ftpserver.user.anonymous.maxloginnumber=20
ftpserver.user.anonymous.maxloginperip=2
ftpserver.user.anonymous.idletime=300
ftpserver.user.anonymous.uploadrate=4800
ftpserver.user.anonymous.downloadrate=4800

#密码 Configure a new user
ftpserver.user.lxw.userpassword=123456
#主目录
Ftpserver.user.lxw.homedirectory=./res/home
#当前用户可用
Ftpserver.user.lxw.enableflag=true
#具有上传权限
Ftpserver.user.lxw.writepermission=true
#最大登陆用户数为20
Ftpserver.user.lxw.maxloginnumber=20
#同IP登陆用户数为2
ftpserver.user.lxw.maxloginperip=2
#空闲时间为300秒
ftpserver.user.lxw.idletime=300
#上传速率限制为480000字节每秒
ftpserver.user.lxw.uploadrate=48000000
#下载速率限制为480000字节每秒
ftpserver.user.lxw.downloadrate=48000000

PS: If you do not want to log on anonymously, you can comment out this configuration for anonymous users

2. Modify D:\apache-ftpserver-1.0.6\res\conf\ftpd-typical.xml This file
<Serverxmlns= "Http://mina.apache.org/ftpserver/spring/v1"Xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance"xsi:schemalocation= "Http://mina.apache.org/ftpserver/spring/v1 http://mina.apache.org/ftpserver/ftpserver-1.0.xsd" ID= "MyServer">    <Listeners>        <!--The default port is 2121 and can be modified to its own port -        <Nio-listenername= "Default"Port= "2121">              <SSL>                <KeyStorefile= "./res/ftpserver.jks"Password= "Password" />            </SSL>        </Nio-listener>    </Listeners>    <File-user-managerfile= "./res/conf/users.properties"Encrypt-passwords= "Clear"/>    <!--add encrypt-passwords= "clear" to change the password encryption method to clear -</Server>
Fourth step: Start Ftpserver

Open the CMD Command window and switch to D:\apache-ftpserver-1.0.6\bin this directory to enter the following command:

Service Installftpd.bat Res/conf/ftpd-typical.xml

Note: The execution of the second command needs to be configured in the environment variable java_home, otherwise it will error, self Baidu.

Running results such as:
Ps:ftpserver started indicates that the FTP service has started successfully

Fifth step: Access to FTP

In the browser, enter ftp://ip:2121 to access, if the port is modified, to replace the corresponding port, IP is the FTP server IP, access as shown:

Sixth step: Start and close of Ftpserver

If this DOS command line is turned off, the FTP service stops. It is therefore necessary to make the start of the fourth step into a bat file with the following contents:

d:cd D:\apache-ftpserver-1.0. 5\Binftpd.bat res/conf/ftpd-typical.xml

Just a name xx, named Xx.bat, click to start the FTP server.

(reprint) Build Apache Ftpserver on Windows

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.