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, I downloaded the 1.1 version here.
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 add users
# Licensed to the Apache software Foundation (ASF) under one# or more contributor license agreements. See the NOTICE file# distributed and this work for additional information# regarding copyright ownership. The ASF licenses this file# to you under the Apache License, Version 2.0 (the# "License"); You are not a use of this file except in compliance# with the License. Obtain a copy of the License at## http://www.apache.org/licenses/LICENSE-2.0## unless required by applicable law or agreed to writing,# software distributed under the License are distributed on an# "as is" BASIS, without warranties O R CONDITIONS of any# KIND, either express or implied. See the License for the# specific language governing permissions and limitations# under the license.# Password is "admin" f Tpserver.user.admin.userpassword=21232f297a57a5a743894a0e4a801fc3ftpserver.user.admin.homedirectory=d:/program Filesftpserver.user.admin.enableflag=trueftpserver.user.admin.writepermission=trueftpserver.user.adMin.maxloginnumber=0ftpserver.user.admin.maxloginperip=0ftpserver.user.admin.idletime= 0ftpserver.user.admin.uploadrate=0ftpserver.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 so that the configuration password is not MD5 encryption -</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