QingStor 对象存储推出 FTP 对接工具 qsftpd



  • qsftpd 是一个将 QingStor 对象存储作为存储后端的 FTP Server,用户通过简单的配置,即可通过 FTP 协议使用对象存储服务。qsftpd 已在 GitHub 开源,更多详情可参见 https://github.com/yunify/qsftpd

    下载安装

    qsftpd 支持 Linux、macOS 和 Windows 操作系统,最新版本下载链接如下,也可访问 GitHub 项目的 Releases 页面查看和下载历史版本。

    使用示例

    创建配置文件,如 qsftpd.yaml,并根据需要进行配置,示例配置文件如下。

    <pre># 设置 QingStor 对象存储服务
    qingstor:
    access_key_id: access_key_id_example
    secret_access_key: secret_access_key_example
    host: qingstor.com
    port: 443
    protocol: https
    log_level: warn

    填写需要使用的 Bucket

    bucket_name: bucket_name_example
    zone: pek3a

    FTP Server 配置,如监听的端口号和最大连接数

    listen_host: 127.0.0.1
    listen_port: 21
    public_host: 127.0.0.1
    max_connections: 128

    认证设置,默认允许匿名用户登录,也可以指定特定的用户登录

    #users:

    username_example: password_example</pre>

    启动 FTP Server。

    <pre>$ qsftpd -c path/to/your/qsftpd.yaml
    [2017-04-12T03:24:40.541Z #2527] INFO – : Listening… 127.0.0.1:21
    [2017-04-12T03:24:40.541Z #2527] INFO – : Starting…
    [2017-04-12T03:24:49.330Z #2527] INFO – : FTP Client connected: ftp.connected, id: 76e209d6a89448279e947a7babe0097d, RemoteAddr: 127.0.0.1:51788, Total: 1

    </pre>

    最后使用 ftp 客户端连接 FTP Server 进行测试。

    <pre>$ ftp -a 127.0.0.1
    Connected to 127.0.0.1.
    220 Welcome to QSFTP Server
    331 User name okay, need password.
    230 Password ok, continue
    Remote system type is UNIX.
    Using binary mode to transfer files.
    ftp> ls
    229 Entering Extended Passive Mode (|||6081|)
    150 Using transfer connection
    d--------- 1 ftp ftp 0 Nov 30 00:00 test-output

    226 Closing transfer connection
    ftp> put AUTHORS
    local: AUTHORS remote: AUTHORS
    229 Entering Extended Passive Mode (|||6887|)
    150 Using transfer connection
    100% |***********************************| 146 91.68 KiB/s 00:00 ETA
    226 Closing transfer connection
    146 bytes sent in 00:00 (2.19 KiB/s)
    ftp>
    </pre>

    https://log.qingcloud.com/?p=2526


登录后回复
 

与 青云QingCloud 社区 的连接断开,我们正在尝试重连,请耐心等待