def makeService(config):
    f = ftp.FTPFactory()

    r = ftp.FTPRealm(config['root'])
    p = portal.Portal(r, config.get('credCheckers', []))

    f.tld = config['root']
    f.userAnonymous = config['userAnonymous']
    f.portal = p
    f.protocol = ftp.FTP

    try:
        portno = int(config['port'])
    except __HOLE__:
        portno = 2121
    return internet.TCPServer(portno, f)
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/tap/ftp.py/makeService