到openstack对象存储(swift)的sftp接口

sftp-cloudfs的Python项目详细描述


SFTP云量

这是一个到openstack的sftp(安全文件传输协议)接口 对象存储,提供充当 SFTP客户端和存储服务。

用于打开sftp会话的用户名/密码对已验证 使用文件/存储服务的身份验证服务获取 身份验证令牌。

客户端和sftp守护进程之间的通信是加密的 一直以来,sftp服务都支持与 远程文件/存储服务。

从0.10开始SCP的支持是有限的。

安装

要求:

  • Python(2.6)
  • paramiko(1.7.6+;1.17.0+推荐)
  • python swiftclient(2.0+)
  • python守护进程(1.5.5)
  • ftp cloudfs(0.35+)
  • python memcached(1.45)

这些是我们测试中推荐的最低版本 环境。

您可能需要使用ssh-keygen创建主机密钥。

要安装软件,请运行以下命令:

python setup.py install

或者使用pip:

pip install sftp-cloudfs

请使用最新的PIP版本,旧版本可能有错误。你 可以使用pip升级pip:pip install--upgrade pip。

用法

安装后,您可以使用sftpcloudfs可执行文件运行服务, 支持以下选项:

--version             show program's version number and exit
-h, --help            show this help message and exit
-a AUTHURL, --auth-url=AUTHURL
                      Authentication URL
--insecure            Allow to access servers without checking SSL certs
-k HOST_KEY, --host-key-file=HOST_KEY
                      Host RSA key used by the server
-b BIND_ADDRESS, --bind-address=BIND_ADDRESS
                      Address to bind (default: 127.0.0.1)
-p PORT, --port=PORT  Port to bind (default: 8022)
--server-ident=SERVER_IDENT
                      Server ident to use when sending the SSH banner to the
                      client (default: sftpcloudfs_VER)
--memcache=MEMCACHE   Memcache server(s) to be used for cache (ip:port)
-l LOG_FILE, --log-file=LOG_FILE
                      Log into provided file
-f, --foreground      Run in the foreground (don't detach from terminal)
--disable-scp         Disable SCP support (default: enabled)
--syslog              Enable logging to system logger (daemon facility)
-v, --verbose         Show detailed information on logging
--pid-file=PID_FILE   Full path to the pid file location
--uid=UID/USER        UID or USER to drop the privileges to when in daemon mode
--gid=GID/GROUP       GID or GROUP to drop the privileges to when in daemon mode
--keystone-auth       Use OpenStack Identity Service (Keystone, requires keystoneclient)
--keystone-auth-version=VERSION
                      Identity API version to be used, default: 2.0
--keystone-region-name=REGION_NAME
                      Region name to be used in Keystone auth
--keystone-tenant-separator=TENANT_SEPARATOR
                      Character used to separate tenant_name/username in
                      Keystone auth, default: TENANT.USERNAME
--keystone-domain-separator=DOMAIN_SEPARATOR
                      Character used to separate project_name/project_domain_name
                      and username/user_domain_name in Keystone auth v3, default: @
--keystone-service-type=SERVICE_TYPE
                      Service type to be used in Keystone auth,
                      default: object-store
--keystone-endpoint-type=ENDPOINT_TYPE
                      Endpoint type to be used in Keystone auth,
                      default: publicURL
--storage-policy=STORAGE_POLICY
                      Swift storage policy to be used (optional)
                      Access to other containers will be denied
--config=CONFIG       Use an alternative configuration file

配置文件的默认位置是/etc/sftpcloudfs.conf。

memcache是可选的,但强烈建议使用它以获得更好的性能。任何memcache 必须保护服务器以防止未经授权访问缓存数据。

默认情况下,将使用swift auth 1.0,并与openstack兼容 使用swauth身份验证中间件的对象存储(swift)。

可选地,可以使用openstack identity service(akakeystone)v2.0或v3。 当前需要python keystoneclient(0.3.2+推荐)来使用keystone auth 它可以通过keystone-auth选项启用。

服务器通过拆分文件来支持大文件(超过5gb默认值) 分为.part子目录,并使用清单文件作为 一个文件。

使用存储策略参数,可以将用户访问限制为单个策略。 如果未指定名称,则使用默认策略(如果未定义其他策略 策略-0被视为默认值)。

请检查示例配置文件以了解更多详细信息。

许可证

这是麻省理工学院许可条款下的免费软件(检查复制文件 包含在这个包中)。

服务器松散地基于bsd许可的sftpd服务器代码:

http://code.google.com/p/pyfilesystem/

联系和支持

项目网站位于:

https://github.com/memset/sftpcloudfs

在那里你可以提交错误报告,寻求帮助或提供补丁。

作者

贡献者

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何将长字符串转换为短得多的字符串   java类型ArrayList<Boolean>中的toArray(T[])方法不适用于参数(Boolean[])   java xfire webservice客户端获取空响应   java软件框架和软件平台有什么区别?   java构建了一个监听数据库更改并调用其他方法的软件。我做得对吗?   安卓 studio(java)中的Paypal:与服务器通信的问题   我们如何在运行时更改java提供的内置注释的消息   java成批进行http调用   序列化   当我使用Tomcat运行我的应用程序时,我得到了java。网MalformedURLException:本地主机名未知:java。网未知后异常   操作系统Java内存映射文件和刷新   java无法用v6构建JXBrowser jar。18+   java有没有办法从运行在同一台服务器上的代码中获取服务器指纹?   使用“代理”用户的java Spring Active Directory身份验证   在Android(Kotlin/Java)活动之间发送图像   java显示ArrayList对象?