Skip to content

Instantly share code, notes, and snippets.

@femmerling
Created June 5, 2013 11:40
Show Gist options
  • Save femmerling/5713293 to your computer and use it in GitHub Desktop.
Save femmerling/5713293 to your computer and use it in GitHub Desktop.
Simple python ftp server with authentication
from pyftpdlib.authorizers import DummyAuthorizer
from pyftpdlib.handlers import FTPHandler
from pyftpdlib.servers import FTPServer
authorizer = DummyAuthorizer()
authorizer.add_user("user", "password", "/home/user", perm="elradfmw")
authorizer.add_anonymous("/home/nobody")
handler = FTPHandler
handler.authorizer = authorizer
server = FTPServer(("0.0.0.0", 21), handler)
server.serve_forever()
@ninjachen
Copy link

Great, It's faster than install a real ftp server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment