mathematrix / zftp Goto Github PK
View Code? Open in Web Editor NEWa ftp server, base openstack swfit and pyftplib
a ftp server, base openstack swfit and pyftplib
这个是一个把文件直接存放在swift中的ftp, === 使用方法: 1, 安装必要的依赖软件: a,安装配置swift,认证使用swauth,测试的版本是1.3.0(使用1.2.0不能正常上传文件) https://github.com/gholt/swauth b,安装pyftplib,zftp是使用pyftplib写的, http://code.google.com/p/pyftpdlib/ 2, 简单配置 a,在swift中创建要使用的account, 用户名,密码, swauth-add-user -A http://127.0.0.1:8080/auth/ -K swauthkey -a test tester testing b,修改zftpserver.py中使用的SWIFT_HOST, SWIFT_PORT, ACCOUNTS, ACCOUNT_ROOT_PATH, 并修改ftpserver要使用的ip地址和端口,默认使用的是127.0.0.1和1876, 3, python zftpserver.py 运行, zjf@zjf-laptop:~$ !341 lftp 127.0.0.1 -p 1876 lftp 127.0.0.1:~> user ftptester Password: lftp [email protected]:~> ls -rw-r--r-- 1 root root 59 Feb 19 08:10 abcdef -rw-r--r-- 1 root root 63 Feb 19 07:52 asynchat.pdf -rw-r--r-- 1 root root 61 Feb 19 05:54 asynchat.st === 当前可用情况, a, 可以使用lftp直接连接ftp使用,可以使用put, get, mkdir, rmdir, rm, mv, ls, cd, pwd, b, 在ubuntu里面打开一个文件夹后,在输入位置(location)的地方,也可以直接输入ftp://127.0.0.1:1876进行上传下载文件,在复制的时候还有点问题, === 实现思路: 写了一个swift_fs(是pyftplib里面abstractedf_fs的子类),在上传文件时,直接把文件创建在swift中, 并在本地文件系统中创建一个文件,里面存放的该文件对应在swift中的文件名称(uuid), 大小信息。 写修改了认证的方法,在添加用户的时候,会在本地和swift中创建一个对应的container, 现在在设置用户的homedir时只能设置为一个级别的目录,不能是/a/b/只能是/a或a。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.