OSS第三方ftp 服务器-问答-阿里云开发者社区-阿里云

开发者社区> 问答> 正文

OSS第三方ftp 服务器

leo.zhouw 2012-01-19 20:18:44 62115


    0,一台运行linux的机器(windows机器理论上也可以,未测试过),这台机器可以正常访问 http://storage.aliyun.com的80端口。
[font='times new roman']
  1. 环境要求:JAVA JDK 1.6以上,apache tomcat 6.0 以上。
  2. 配置环境变量 JAVA_HOME  和 CATALINA_HOME(这个指向的就是tomcat 解压后的路径)
  3. ftpserver-spring-war.war 放到$CATALINA_HOME/webapps下。
  4. 进入$CATALINA_HOME/bin 运行startup.sh即可。  启动浏览器,输入http://<IP>:8080/ftpserver-spring-war 如果显示ftp server is running 即说明运行成功。

   NOTE:现在你的电脑会开启一个ftp 服务,ftp:默认端口是2121,登陆的用户名,密码分别对应oss 的accessKeyId和accessKey.
  Ftp 默认端口配置是在$CATALINA_HOME/webapps/ftpserver-spring-war/WEB-INF/applicationContext.xml 文件下。
          “ <nio-listener name= "default" port= "2121" >” 只需把2121替换成自己想要的端口,然后保存,重启tomcat即可。





Java 应用服务中间件 Linux Apache 对象存储 数据安全/隐私保护 Windows
分享到
取消 提交回答
全部回答(17)
  • 2014-10-31 11:59:52
    ReOSS第三方ftp服务器
    连接FTP之后可以看到Bucket,但是没有权限
    0 0
  • 寒兰一梦
    2014-06-26 19:14:21
    ReOSS第三方ftp服务器
    不是有Ftp4oss吗?
    0 0
  • samson1
    2013-12-22 11:37:33
    ReOSS第三方ftp服务器
    http://storage.aliyun.com 已经改为 http://oss.aliyun.com了,文件夹不能进入!!!在哪修改请求的域名?

    下面是报错信息:


    [ INFO] 2013-12-22 11:37:25,050 [EqktIjX52BUcmQHx] [127.0.0.1] Received error response: Status Code: 403, AOS ServiceName: null, AOS RequestID: 52B65E2C37106D0A6A4D6A82, AOS ErrorCode:AccessDenied, AOS ErrorMessage:Your host cannot contain 'storage.aliyun.com', please replace it with 'oss.aliyuncs.com'.
    Status Code: 403, AOS ServiceName: AliyunOSS, AOS RequestID: 52B65E2C37106D0A6A4D6A82, AOS ErrorCode:AccessDenied, AOS ErrorMessage:Your host cannot contain 'storage.aliyun.com', please replace it with 'oss.aliyuncs.com'.
        at com.aliyun.aos.http.AOSHttpClient.handleErrorResponse(AOSHttpClient.java:323)
        at com.aliyun.aos.http.AOSHttpClient.executeHelper(AOSHttpClient.java:160)
        at com.aliyun.aos.http.AOSHttpClient.execute(AOSHttpClient.java:78)
        at com.aliyun.aos.services.oss.OSSClientImpl.invoke(OSSClientImpl.java:733)
        at com.aliyun.aos.services.oss.OSSClientImpl.invoke(OSSClientImpl.java:704)
        at com.aliyun.aos.services.oss.OSSClientImpl.listObjects(OSSClientImpl.java:167)
        at com.aliyun.aos.services.oss.OSSClientImpl.listAllObjects(OSSClientImpl.java:141)
        at oss.aliyun.oss.ftp.filesystem.OSSFile.listDir(OSSFile.java:399)
        at oss.aliyun.oss.ftp.filesystem.OSSFile.listFiles(OSSFile.java:261)
        at oss.aliyun.oss.ftp.filesystem.OSSFileSystemView.changeWorkingDirectory(OSSFileSystemView.java:46)
        at org.apache.ftpserver.command.impl.CWD.execute(CWD.java:72)
        at org.apache.ftpserver.impl.DefaultFtpHandler.messageReceived(DefaultFtpHandler.java:211)
        at org.apache.ftpserver.listener.nio.FtpHandlerAdapter.messageReceived(FtpHandlerAdapter.java:62)
        at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:716)
        at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
        at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
        at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:796)
        at org.apache.ftpserver.listener.nio.FtpLoggingFilter.messageReceived(FtpLoggingFilter.java:85)
        at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
        at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
        at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:796)
        at org.apache.mina.core.filterchain.IoFilterEvent.fire(IoFilterEvent.java:75)
        at org.apache.mina.filter.logging.MdcInjectionFilter.filter(MdcInjectionFilter.java:136)
        at org.apache.mina.filter.util.CommonEventFilter.messageReceived(CommonEventFilter.java:70)
        at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
        at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
        at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:796)
        at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:427)
        at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:245)
        at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
        at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
        at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:796)
        at org.apache.mina.core.filterchain.IoFilterEvent.fire(IoFilterEvent.java:75)
        at org.apache.mina.core.session.IoEvent.run(IoEvent.java:63)
        at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTask(OrderedThreadPoolExecutor.java:780)
        at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTasks(OrderedThreadPoolExecutor.java:772)
        at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.run(OrderedThreadPoolExecutor.java:714)
        at java.lang.Thread.run(Thread.java:619)
    [ INFO] 2013-12-22 11:37:25,065 [EqktIjX52BUcmQHx] [127.0.0.1] SENT: 550 No such directory.

    -------------------------

    ReOSS第三方ftp服务器
    上面域名写错了是: http://storage.aliyun.com 已经改为 http://oss.aliyuncs.com
    0 0
  • hanqian
    2013-08-30 18:55:37
    ReReOSS第三方ftp服务器
    引用第11楼hi50007641于2013-06-26 16:25发表的 ReOSS第三方ftp服务器 :
    这个必须顶,不过整完以后连接有报错

    AOS ErrorCode:AccessDenied, AOS ErrorMessage:Your host cannot contain 'storage.aliyun.com', please replace it with 'oss.aliyuncs.com'.

    阿里把请求地址变了?需要更新下了
    .......
    我的也是是这个错,找了半天没看到这个地址在哪里写的。
    0 0
  • 乌龟
    2013-08-06 00:25:57
    ReOSS第三方ftp服务器
    哦,示例开源吗?
    0 0
滑动查看更多

集结各类场景实战经验,助你开发运维畅行无忧

推荐文章
相似问题