<div dir="ltr">Hi Guys,<div><br></div><div>I have following code.</div><div><pre style="color:rgb(0,0,0);font-family:'DejaVu Sans Mono';font-size:9pt"><pre style="font-family:'DejaVu Sans Mono';font-size:9pt">-------------------------------------------------------------</pre><div><br></div></pre><pre style="color:rgb(0,0,0);font-family:'DejaVu Sans Mono';font-size:9pt"><span style="color:rgb(0,0,128);font-weight:bold">from </span>twisted.protocols.ftp <span style="color:rgb(0,0,128);font-weight:bold">import </span>FTPFactory, FTPRealm, FTPShell<br><span style="color:rgb(0,0,128);font-weight:bold">from </span>twisted.cred.portal <span style="color:rgb(0,0,128);font-weight:bold">import </span>Portal<br><span style="color:rgb(0,0,128);font-weight:bold">from </span>twisted.cred.checkers <span style="color:rgb(0,0,128);font-weight:bold">import </span>AllowAnonymousAccess, FilePasswordDB<br><span style="color:rgb(0,0,128);font-weight:bold">from </span>twisted.internet <span style="color:rgb(0,0,128);font-weight:bold">import </span>reactor<br><span style="color:rgb(0,0,128);font-weight:bold">from </span>twisted.cred.checkers <span style="color:rgb(0,0,128);font-weight:bold">import </span>InMemoryUsernamePasswordDatabaseDontUse <span style="color:rgb(0,0,128);font-weight:bold">as </span>InMemoryDB<br><span style="color:rgb(0,0,128);font-weight:bold">from </span>twisted.python <span style="color:rgb(0,0,128);font-weight:bold">import </span>log<br><span style="color:rgb(0,0,128);font-weight:bold">from </span>twisted.cred.credentials <span style="color:rgb(0,0,128);font-weight:bold">import </span>UsernamePassword<br><br><br><span style="color:rgb(0,0,128);font-weight:bold">import </span>sys<br><br>users = {<br>    <span style="color:rgb(0,128,0);font-weight:bold">"user"</span>: <span style="color:rgb(0,128,0);font-weight:bold">"password"<br></span>}<br><br>im_memory_db_checker = InMemoryDB(**users)<br><br>p = Portal(FTPRealm(<span style="color:rgb(0,128,0);font-weight:bold">'./'</span>),<br>           (<br>               AllowAnonymousAccess(),<br>               im_memory_db_checker,<br>            )<br>          )<br><br>f = FTPFactory(p)<br><br>log.startLogging(sys.stdout)<br>reactor.listenTCP(<span style="color:rgb(0,0,255)">21</span>, f)<br>reactor.run()<br></pre><pre style="color:rgb(0,0,0);font-family:'DejaVu Sans Mono';font-size:9pt">-------------------------------------------------------------</pre><pre style="color:rgb(0,0,0);font-family:'DejaVu Sans Mono';font-size:9pt">While running above code, when I enter wrong credentials in my FileZilla, it returns directory listing successfully but when I login successfully it says :</pre><pre style="color:rgb(0,0,0);font-family:'DejaVu Sans Mono';font-size:9pt"><b>Failed to Response: 550 []: No such file or directory.
Error:  Failed to retrieve directory listing</b></pre><pre style="color:rgb(0,0,0);font-family:'DejaVu Sans Mono';font-size:9pt">I have got this script from examples given on twisted site.</pre><pre style="color:rgb(0,0,0);font-family:'DejaVu Sans Mono';font-size:9pt">What am I missing ?, Please guide me.</pre><pre style="color:rgb(0,0,0);font-family:'DejaVu Sans Mono';font-size:9pt"><br></pre><pre style="color:rgb(0,0,0);font-family:'DejaVu Sans Mono';font-size:9pt">Thank you,</pre><pre style="color:rgb(0,0,0);font-family:'DejaVu Sans Mono';font-size:9pt"><span style="font-family:arial,sans-serif;font-size:small;color:rgb(34,34,34)"><br></span></pre><pre style="color:rgb(0,0,0);font-family:'DejaVu Sans Mono';font-size:9pt"><span style="font-family:arial,sans-serif;font-size:small;color:rgb(34,34,34)">-- </span><br></pre><div><div class="gmail_signature"><div dir="ltr"><div><b>Regards,</b><br></div>Malhar Vora<br></div></div>
</div></div></div>