Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

This comment has been minimized.

Copy link

ninjachen commented Nov 12, 2019

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
You can’t perform that action at this time.