Skip to content

Instantly share code, notes, and snippets.

@yatt
Created December 10, 2011 03:58
Show Gist options
  • Select an option

  • Save yatt/1454559 to your computer and use it in GitHub Desktop.

Select an option

Save yatt/1454559 to your computer and use it in GitHub Desktop.
simple ftp server
# ref: http://d.hatena.ne.jp/tasukuchan/20100420/how_to_use_pyftpdlib
from pyftpdlib import ftpserver
authorizer = ftpserver.DummyAuthorizer()
authorizer.add_user('user', 'password', './user', perm='elradfmw')
ftp_handler = ftpserver.FTPHandler
ftp_handler.authorizer = authorizer
address = ('localhost', 21)
ftpd = ftpserver.FTPServer(address, ftp_handler)
ftpd.serve_forever()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment