Skip to content

Instantly share code, notes, and snippets.

View apwan's full-sized avatar

Yijie apwan

  • The University of Hong Kong
View GitHub Profile
@apwan
apwan / ftpdemo.py
Created September 9, 2018 09:51
Python ftp server demo, allow authorized user control.
#!/usr/bin/env python
# Python ftp server demo, allow authorized user control.
from pyftpdlib.authorizers import DummyAuthorizer
from pyftpdlib.handlers import FTPHandler
from pyftpdlib.servers import FTPServer
authorizer = DummyAuthorizer()
authorizer.add_user("admin", "passcode", "/datadisk", perm="elradfmw")