[Twisted-Python] Filed to receive directory listing after successful login in FTPFactory
Hi Guys, I have following code. ------------------------------------------------------------- from twisted.protocols.ftp import FTPFactory, FTPRealm, FTPShell from twisted.cred.portal import Portal from twisted.cred.checkers import AllowAnonymousAccess, FilePasswordDB from twisted.internet import reactor from twisted.cred.checkers import InMemoryUsernamePasswordDatabaseDontUse as InMemoryDB from twisted.python import log from twisted.cred.credentials import UsernamePassword import sys users = { "user": "password" } im_memory_db_checker = InMemoryDB(**users) p = Portal(FTPRealm('./'), ( AllowAnonymousAccess(), im_memory_db_checker, ) ) f = FTPFactory(p) log.startLogging(sys.stdout) reactor.listenTCP(21, f) reactor.run() ------------------------------------------------------------- While running above code, when I enter wrong credentials in my FileZilla, it returns directory listing successfully but when I login successfully it says : *Failed to Response: 550 []: No such file or directory. Error: Failed to retrieve directory listing* I have got this script from examples given on twisted site. What am I missing ?, Please guide me. Thank you, -- *Regards,* Malhar Vora
participants (1)
-
Malhar Vora