Skip to content

Instantly share code, notes, and snippets.

@jeffgeiger
Created July 31, 2017 22:38
Show Gist options
  • Save jeffgeiger/b5ce5f4065a57208033d9796e1aefc7c to your computer and use it in GitHub Desktop.
Save jeffgeiger/b5ce5f4065a57208033d9796e1aefc7c to your computer and use it in GitHub Desktop.
Simple python FTP server
from pyftpdlib.authorizers import DummyAuthorizer
from pyftpdlib.handlers import FTPHandler
from pyftpdlib.servers import FTPServer
authorizer = DummyAuthorizer()
authorizer.add_user("user", "12345", "/tmp", perm="elradfmw")
authorizer.add_anonymous("/tmp")
handler = FTPHandler
handler.authorizer = authorizer
server = FTPServer(("0.0.0.0", 21), handler)
server.serve_forever()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment