{ "info": { "author": "Kevin McDonald", "author_email": "kmcdonald@softlayer.com", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "Environment :: No Input/Output (Daemon)", "Framework :: Twisted", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Internet :: File Transfer Protocol (FTP)" ], "description": "SwFTP\n=====\nSwFTP is an FTP and SFTP interface for Openstack Object Storage (swift). It will act as a proxy between the FTP/SFTP protocols and OpenStack Object Storage.\n\nFeatures\n--------\n* Configurable auth endpoint to use any OpenStack Swift installation\n* Server-wide Configurable HTTP Connection Pool for Swift Communications (size and timeout)\n* Support for HTTPS communication to the backend OpenStack Object Storage cluster\n* Simple Installation `pip install swftp`\n* StatsD Support\n* Stats Web Interface\n* Chef Cookbook: https://github.com/softlayer/chef-swftp\n\nRequirements\n------------\n* Python 2.6-2.7\n* OpenSSL/pycrypto\n* Twisted/Twisted-Conch\n* pyasn1\n\nGetting Started\n---------------\n### Installing\nInstall via pip:\n```bash\n$ pip install swftp\n```\nNote: If you don't have pip [here's how to install it](http://www.pip-installer.org/en/latest/installing.html).\n\nInstall using git/pip:\n```bash\n$ pip install -U git+git://github.com/softlayer/swftp.git\n```\n\nInstall from source:\n```bash\n$ python setup.py install\n```\n\n### Start FTP Server\nTo run the FTP server, simply run this command. \n```bash\n$ swftp-ftp -a http://127.0.0.1:8080/auth/v1.0\n2013-02-18 16:28:50-0600 [-] Log opened.\n2013-02-18 16:28:50-0600 [-] FTPFactory starting on 5021\n2013-02-18 16:28:50-0600 [-] Starting factory \n```\n\n### Start SFTP Server\nThe SFTP requires a bit of setup the first time.\n\n\nYou'll need to create a public/private key pair for SSH and move them to the /etc/swftp directory (this location is configurable).\n```bash\n$ mkdir /etc/swftp\n$ ssh-keygen -h -b 2048 -N \"\" -t rsa -f /etc/swftp/id_rsa\n```\n\nAfter placing the required files, the command to start the server is similar to the FTP one.\n```bash\n$ swftp-sftp -a http://127.0.0.1:8080/auth/v1.0\n2013-02-18 16:29:14-0600 [-] Log opened.\n2013-02-18 22:29:14+0000 [-] SSHFactory starting on 5022\n```\n\nConfiguration\n-------------\n### Command Line\nThe command line configuration allows you to speficfy a custom OpenStack Swift Auth URL, as well as the location of the config file (detailed later).\n\nFTP Command-line options:\n```bash\n$ swftp-ftp --help\nUsage: swftp-ftp [options]\nOptions:\n -c, --config_file= Location of the swftp config file. [default:\n /etc/swftp/swftp.conf]\n -a, --auth_url= Auth Url to use. Defaults to the config file value if it\n exists. [default: http://127.0.0.1:8080/auth/v1.0]\n -p, --port= Port to bind to.\n -h, --host= IP to bind to.\n --version Display Twisted version and exit.\n --help Display this help and exit.\n```\n\nSFTP Command-line options:\n```bash\n$ swftp-sftp --help\nUsage: swftp-sftp [options]\nOptions:\n -c, --config_file= Location of the swftp config file. [default:\n /etc/swftp/swftp.conf]\n -a, --auth_url= Auth Url to use. Defaults to the config file value if it\n exists.[default: http://127.0.0.1:8080/auth/v1.0]\n -p, --port= Port to bind to.\n -h, --host= IP to bind to.\n --priv_key= Private Key Location.\n --pub_key= Public Key Location.\n --version Display Twisted version and exit.\n --help Display this help and exit.\n```\n\n### Config File\nThe default location for the config file is /etc/swftp/swftp.conf.\n\nHere is an example swftp.conf with all defaults:\n```\n[sftp]\nauth_url = http://127.0.0.1:8080/auth/v1.0\nhost = 0.0.0.0\nport = 5022\npriv_key = /etc/swftp/id_rsa\npub_key = /etc/swftp/id_rsa.pub\nnum_persistent_connections = 20\nnum_connections_per_session = 10\nconnection_timeout = 240\nextra_headers = X-Swftp: true, X-Forwarded-Proto: SFTP\n\nlog_statsd_host = \nlog_statsd_port = 8125\nlog_statsd_sample_rate = 10\nlog_statsd_metric_prefix = sftp\n\nstats_host = \nstats_port = 38022\n\n[ftp]\nauth_url = http://127.0.0.1:8080/auth/v1.0\nhost = 0.0.0.0\nport = 5021\nnum_persistent_connections = 20\nnum_connections_per_session = 10\nconnection_timeout = 240\nwelcome_message = Welcome to SwFTP - An FTP/SFTP interface for Openstack Swift\nextra_headers = X-Swftp: true, X-Forwarded-Proto: SFTP\n\nlog_statsd_host = \nlog_statsd_port = 8125\nlog_statsd_sample_rate = 10\nlog_statsd_metric_prefix = ftp\n\nstats_host = \nstats_port = 38021\n```\n\nCaveats\n-------\n* You cannot create top-level files, just directories (because the top level are containers).\n* You cannot rename any non-empty directory.\n* No recursive delete. Most clients will explicitly delete each file/directory recursively anyway.\n* Fake-directories and real objects of the same name will simply display the directory. A lot of FTP/SFTP clients [actually explode](http://gifsoup.com/webroot/animatedgifs2/1095919_o.gif) if a directory listing has duplicates.\n\nProject Organization\n--------------------\n* etc/: Sample config files\n* swftp/: Core/shared code\n * ftp/: FTP server\n * sftp/: SFTP server\n * test/: Unit and functional tests\n* twisted/: For the Twisted Plugin System\n\nPackaging/Creating Init Scripts\n-------------------------------\nPackaged with SwFTP are a set of example init scripts, upstart scripts. They are all located within the /etc/ directory in the source.\n\n* Upstart\n * /etc/init/swftp-ftp.conf\n * /etc/init/swftp-sftp.conf\n* init.d\n * /etc/init/swftp-ftp\n * /etc/init/swftp-sftp\n* Supervisor\n * /etc/supervisor/conf.d/swftp.conf\n* Example swftp.conf file\n * /etc/swftp/swftp.conf.sample\n\nStats Web Interface\n-------------------\nThe web interface is an HTTP interface that provides a way to get more app-specific metrics. The only format supported currently is JSON. If the 'stats_host' config value is set, the server will listen to that interface.\n\n**http://{stats_host}:{stats_port}/stats.json**\n\n```bash\n$ curl http://127.0.0.1:38022/stats.json | python -mjson.tool\n{\n \"rates\": {\n \"auth.fail\": 0,\n \"auth.succeed\": 0,\n \"command.getAttrs\": 0,\n \"command.login\": 0,\n \"command.logout\": 9,\n \"command.makeDirectory\": 0,\n \"command.openDirectory\": 0,\n \"command.openFile\": 0,\n \"command.removeDirectory\": 0,\n \"command.removeFile\": 0,\n \"command.renameFile\": 0,\n \"num_clients\": -9,\n \"transfer.egress_bytes\": 0,\n \"transfer.ingress_bytes\": 47662\n },\n \"totals\": {\n \"auth.fail\": 0,\n \"auth.succeed\": 91,\n \"command.getAttrs\": 15,\n \"command.login\": 91,\n \"command.logout\": 91,\n \"command.makeDirectory\": 0,\n \"command.openDirectory\": 7,\n \"command.openFile\": 8,\n \"command.removeDirectory\": 3,\n \"command.removeFile\": 0,\n \"command.renameFile\": 7,\n \"num_clients\": 0,\n \"transfer.egress_bytes\": 11567105,\n \"transfer.ingress_bytes\": 11567105\n }\n}\n```\n\nStatsd Support\n--------------\nStatsd support relies on [txStatsD](https://pypi.python.org/pypi/txStatsD). If the 'log_statsd_host' config value is set, the following paths will be emited into statsd.\n\n### General\n\n* stats.[prefix].egress_bytes\n* stats.[prefix].ingress_bytes\n* stats.gauges.[prefix].clients\n* stats.gauges.[prefix].proc.threads\n* stats.gauges.[prefix].proc.cpu.percent\n* stats.gauges.[prefix].proc.cpu.system\n* stats.gauges.[prefix].proc.cpu.user\n* stats.gauges.[prefix].proc.memory.percent\n* stats.gauges.[prefix].proc.memory.rss\n* stats.gauges.[prefix].proc.memory.vsize\n* stats.gauges.[prefix].proc.net.status.[tcp_state]\n\n### SFTP-related\n\n* stats.[prefix].command.getAttrs\n* stats.[prefix].command.login\n* stats.[prefix].command.logout\n* stats.[prefix].command.makeDirectory\n* stats.[prefix].command.openDirectory\n* stats.[prefix].command.openFile\n* stats.[prefix].command.removeDirectory\n* stats.[prefix].command.removeFile\n* stats.[prefix].command.renameFile\n\n### FTP-related\n\n* stats.[prefix].command.access\n* stats.[prefix].command.list\n* stats.[prefix].command.login\n* stats.[prefix].command.logout\n* stats.[prefix].command.makeDirectory\n* stats.[prefix].command.openForReading\n* stats.[prefix].command.openForWriting\n* stats.[prefix].command.removeDirectory\n* stats.[prefix].command.removeFile\n* stats.[prefix].command.rename\n* stats.[prefix].command.stat\n\nDevelopment\n-----------\nDevelopment works with a fork and pull request process. Feel free submit pull requests.\n\nTo run the tests, run\n```bash\n$ trial swftp\n```\n\nTo run tests against live swftp servers (ftp and sftp) it requires a test config. The default location is `/etc/swftp/test.conf` but can be set with the SWFTP_TEST_CONFIG_FILE environmental variable. Here is a sample test config\n\n```\n[func_test]\nauth_host = 127.0.0.1\nauth_port = 8080\nauth_ssl = no\nauth_prefix = /auth/\n\naccount = test\nusername = tester\npassword = testing\n\nsftp_host = 127.0.0.1\nsftp_port = 5022\n\nftp_host = 127.0.0.1\nftp_port = 5021\n\n```\n\nLicense\n-------\nCopyright (c) 2013 SoftLayer Technologies, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/softlayer/swftp", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "swftp", "package_url": "https://pypi.org/project/swftp/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/swftp/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/softlayer/swftp" }, "release_url": "https://pypi.org/project/swftp/1.0.7/", "requires_dist": null, "requires_python": null, "summary": "SwFTP is an FTP and SFTP interface for Openstack Object\nStorage (swift)", "version": "1.0.7" }, "last_serial": 1320729, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "1ba2b841e8eed1ca61a005637ae8568c", "sha256": "ef74b33723053b5e98482056baab4d38742af9e83d713c0c8fb865cf83c52531" }, "downloads": -1, "filename": "swftp-1.0.0.tar.gz", "has_sig": false, "md5_digest": "1ba2b841e8eed1ca61a005637ae8568c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20220, "upload_time": "2013-02-05T19:48:42", "url": "https://files.pythonhosted.org/packages/bf/2f/2e4f684d711aaf255611f43c3bd8d3e19ed0a1590030529950ede65e8718/swftp-1.0.0.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "7588491529c9fca25fb003e6a5696efb", "sha256": "927be460a655011f42ce7b552a670e52c79a6deeecae17a7c3d7f67dabfeccbb" }, "downloads": -1, "filename": "swftp-1.0.2.tar.gz", "has_sig": false, "md5_digest": "7588491529c9fca25fb003e6a5696efb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21560, "upload_time": "2013-02-19T20:49:33", "url": "https://files.pythonhosted.org/packages/e6/85/a53ef1ac8b78a6f25cb253747ea1537fd75a37506405f74b8e5f241dd664/swftp-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "f7603617f50ee07089dec54a97ec39c3", "sha256": "a432041e83bcb58f4266c80a2fab0309bb4d212cb958960f0eb795197a48f2f4" }, "downloads": -1, "filename": "swftp-1.0.3.tar.gz", "has_sig": false, "md5_digest": "f7603617f50ee07089dec54a97ec39c3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22099, "upload_time": "2013-02-23T18:07:44", "url": "https://files.pythonhosted.org/packages/6f/47/edffa927d265003d496672a36864aa0ad36b7109aa785bf54cbe42d6a721/swftp-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "88b97219f3e4ad96fa1079e84256599d", "sha256": "c691282e2c75a9236e24b34818e04528026782f9d0f22dcc246e0c8b1103e11b" }, "downloads": -1, "filename": "swftp-1.0.4.tar.gz", "has_sig": false, "md5_digest": "88b97219f3e4ad96fa1079e84256599d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24066, "upload_time": "2013-04-03T12:43:11", "url": "https://files.pythonhosted.org/packages/59/2e/2a1b0129e2479b728d38d46d277702ff4db4a40e16d1b8e245f71c30e711/swftp-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "c4098f7d2f3add401f08a6bbed0a8cba", "sha256": "db10652c884d326cf0962ca3a3a4773bd7252b70db2c200dbee49916e7e85c04" }, "downloads": -1, "filename": "swftp-1.0.5.tar.gz", "has_sig": false, "md5_digest": "c4098f7d2f3add401f08a6bbed0a8cba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24339, "upload_time": "2013-04-09T20:23:21", "url": "https://files.pythonhosted.org/packages/9e/14/2d6143930434cdcc85be7add629934ba64efd8e54d3a9bc23aaed3cc1b8b/swftp-1.0.5.tar.gz" } ], "1.0.6": [ { "comment_text": "", "digests": { "md5": "f11c398f04863098b560d62b81d45558", "sha256": "60d96a53c08885e8e16f16dcd415b877c66eb5eccb54d2f87debccdbd0c8cacc" }, "downloads": -1, "filename": "swftp-1.0.6.tar.gz", "has_sig": false, "md5_digest": "f11c398f04863098b560d62b81d45558", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 38351, "upload_time": "2013-04-29T18:59:07", "url": "https://files.pythonhosted.org/packages/db/2b/2d5037981b109774eccc69524abc0a6e64f43d55d70d77202c97012e2735/swftp-1.0.6.tar.gz" } ], "1.0.7": [ { "comment_text": "", "digests": { "md5": "81e820407234fb03dc5079233e62c242", "sha256": "7c992949f78ad89bb991451232c296d096f38e423dfd29c21c61221c4ec0d65b" }, "downloads": -1, "filename": "swftp-1.0.7.tar.gz", "has_sig": false, "md5_digest": "81e820407234fb03dc5079233e62c242", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 40903, "upload_time": "2013-07-03T15:23:40", "url": "https://files.pythonhosted.org/packages/fb/9b/001d20e7dc9001d0d9a818c9e2d1a6cb23b9dc7ac12a75c2facf9fb8a497/swftp-1.0.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "81e820407234fb03dc5079233e62c242", "sha256": "7c992949f78ad89bb991451232c296d096f38e423dfd29c21c61221c4ec0d65b" }, "downloads": -1, "filename": "swftp-1.0.7.tar.gz", "has_sig": false, "md5_digest": "81e820407234fb03dc5079233e62c242", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 40903, "upload_time": "2013-07-03T15:23:40", "url": "https://files.pythonhosted.org/packages/fb/9b/001d20e7dc9001d0d9a818c9e2d1a6cb23b9dc7ac12a75c2facf9fb8a497/swftp-1.0.7.tar.gz" } ] }