日期:2014-05-16  浏览次数:20685 次

使用Apache FtpServer搭建FTP服务器

Apache FtpServer是纯Java写的(基于mina-http://mina.apache.org/)开源FTP服务器。 http://mina.apache.org/ftpserver/

一. 安装

 

1. 从 http://mina.apache.org/ftpserver/ 下载

  http://mina.apache.org/ftpserver/downloads.html

2. 解压缩到本地

 


二. 启动ftpserver

进入 %FtpServer_Home%/bin下 新建bun.bat,内容如下

ftpd.bat res/conf/ftpd-typical.xml

保存run.bat,然后双击运行

访问 yourip:2121

注:直接运行 ftpd.bat启动起来的ftpserver没有任何用户信息,所以是没有意义的.apache ftpserver为我们提供了两个现有的服务配置


以上我们是用它提供的一个典型的配置信息ftpd-typical.xml(在运行ftpd.bat时将res/conf/ftpd-typical.xml作为参数传入),而用户信息位于users.properties中



三. 配置用户信息

res\conf\users.properties:

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apach