1. 下载ftpserver-1.0.5.zip
2. 解压
3. 更改bin下, 拷贝ftpd.bat一份并更名为adduser.bat, 将adduser.bat中的set MAIN_CLASS=org.apache.ftpserver.main.CommandLine改为set MAIN_CLASS=org.apache.ftpserver.main.AddUser
4. ftpd-typical.xml内容如下:
<server xmlns="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" max-logins="500"
anon-enabled="true"
max-anon-logins="123"
max-login-failures="124"
login-failure-delay="125">
<listeners>
<nio-listener name="default" port="21">
<ssl>
<keystore file="./res/ftpserver.jks" password="password" />
</ssl>
</nio-listener>
</listeners>
<file-user-manager file="./res/conf/users.properties"/>
</server>
5. 在bin下执行: adduser.bat res/conf/ftpd-typical.xml
Using XML configuration file res/conf/ftpd-typical.xml...
Asking for details of the new user
User name:
hing
Password:
hing
Home directory:
./testdown
Enabled (Y/N):
y
Max idle time in seconds (0 for none):
0
Write permission (Y/N):
y
Maximum number of concurrent logins (0 for no restriction)
0
Maximum number of concurrent logins per IP (0 for no restriction)
0
Maximum download rate (0 for no restriction)
0
Maximum upload rate (0 for no restriction)
0
User saved to file: D:/apache/ftpserver-1.0.5/./res/conf/users.properties
6. 将其安装为服务: service install ftpd res/conf/ftpd-typical.xml
Installing the service 'ftpd' ...
Using FTPD_HOME: D:/apache/ftpserver-1.0.5
Using JAVA_HOME: D:/Java/jdk1.6.0_25
Using JVM: D:/Java/jdk1.6.0_25/jre/bin/server/jvm.dll
start
start;res/conf/ftpd-typical.xml
start;res/conf/ftpd-typical.xml
The service 'ftpd' has been installed.
7. 用客户端连接一下试试.
以上经本人测试过.