Created
February 5, 2015 08:21
-
-
Save ryubro/33f5e76ca49dff122097 to your computer and use it in GitHub Desktop.
현재 폴더에서 FTP 서버를 실행해주는 python 코드
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 | |
import os | |
authorizer = DummyAuthorizer() | |
path = os.getcwd() | |
authorizer.add_user("user", "pass", path, perm="elradfmw") | |
handler = FTPHandler | |
handler.passive_ports = range(60000, 65535) | |
handler.authorizer = authorizer | |
server = FTPServer(("", 21), handler) | |
server.serve_forever() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment