Created
June 5, 2013 11:40
-
-
Save femmerling/5713293 to your computer and use it in GitHub Desktop.
Simple python ftp server with authentication
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Great, It's faster than install a real ftp server