你好,游客 登录 注册 搜索
背景:
阅读新闻

使用Apache FtpServer搭建FTP服务器

[日期:2012-10-09] 来源:Linux社区  作者:buyaore_wo [字体:大 中 小]

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

一. 安装

1. 下载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:

  1. # Licensed to the Apache Software Foundation (ASF) under one 
  2. # or more contributor license agreements.  See the NOTICE file 
  3. # distributed with this work for additional information 
  4. # regarding copyright ownership.  The ASF licenses this file 
  5. # to you under the Apache License, Version 2.0 (the 
  6. # "License"); you may not use this file except in compliance 
  7. # with the License.  You may obtain a copy of the License at 
  8. # 
  9. #  http://www.apache.org/licenses/LICENSE-2.0 
  10. # 
  11. # Unless required by applicable law or agreed to in writing, 
  12. # software distributed under the License is distributed on an 
  13. # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
  14. # KIND, either express or implied.  See the License for the 
  15. # specific language governing permissions and limitations 
  16. # under the License. 
  17.  
  18.  
  19. # Password is "admin" 
  20. #格式 ftpserver.user.用户名.属性 
  21.  
  22.  
  23. #密码 
  24. ftpserver.user.admin.userpassword=21232F297A57A5A743894A0E4A801FC3 
  25. #目录 
  26. ftpserver.user.admin.homedirectory=./res/home 
  27. ftpserver.user.admin.enableflag=true 
  28. #是否可写 
  29. ftpserver.user.admin.writepermission=true 
  30. ftpserver.user.admin.maxloginnumber=0 
  31. ftpserver.user.admin.maxloginperip=0 
  32. ftpserver.user.admin.idletime=0 
  33. ftpserver.user.admin.uploadrate=0 
  34. ftpserver.user.admin.downloadrate=0 
  35.  
  36.  
  37. ftpserver.user.anonymous.userpassword= 
  38. ftpserver.user.anonymous.homedirectory=./res/anonymous 
  39. ftpserver.user.anonymous.enableflag=true 
  40. ftpserver.user.anonymous.writepermission=false 
  41. ftpserver.user.anonymous.maxloginnumber=20 
  42. ftpserver.user.anonymous.maxloginperip=2 
  43. ftpserver.user.anonymous.idletime=300 
  44. ftpserver.user.anonymous.uploadrate=4800 
  45. ftpserver.user.anonymous.downloadrate=4800 
linux
相关资讯       ftp服务器  Apache FtpServer  FtpServer 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款