Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
4.7k views
in .NET FTP by
Excuse for my bad bad english. I tryed to connect to my ftp server with ftpconnection (free library), i used the sample application downloaded from your site. When call getfiles() this is the trace log:

DEBUG [EnterpriseDT.Net.Ftp.FTPClient] 24 ott 2005 18.52.56.080 : Connecting to XXX.XXX.XXX.XX:21
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 ott 2005 18.52.56.611 : 220 Serv-U FTP-Server v2.5i for WinSock ready...
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 ott 2005 18.52.56.621 : ---> USER user
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 ott 2005 18.52.56.851 : 331 User name okay, need password.
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 ott 2005 18.52.56.851 : ---> PASS ********
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 ott 2005 18.52.57.112 : 230 User logged in, proceed.
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 ott 2005 18.52.57.112 : ---> TYPE A
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 ott 2005 18.52.57.342 : 200 Type set to A.
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 ott 2005 18.52.57.352 : ---> PASV
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 ott 2005 18.52.57.583 : 227 Entering Passive Mode (XXX,XXX,XXX,XX,XX,XXX)
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 ott 2005 18.52.57.823 : ---> NLST .
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 ott 2005 18.52.58.063 : 150 Opening ASCII mode data connection for /bin/ls.
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 ott 2005 18.52.58.434 : 226-Maximum disk quota limited to 2000000 Kbytes
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 ott 2005 18.52.58.434 :     Used disk quota 1000 Kbytes, available 1998999 Kbytes
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 ott 2005 18.52.58.434 : 226 Transfer complete.
DEBUG [EnterpriseDT.Net.Ftp.FTPClient] 24 ott 2005 18.52.58.434 : No listing data found
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 ott 2005 18.52.58.434 : ---> QUIT
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 ott 2005 18.52.58.664 : 221 Goodbye!


If i use the command line sample with ftpclient api i work correctly, whi ? What is the problem

PS I trye to use the active mode buth :( ?
Thanks
Stefano Paparesta

5 Answers

0 votes
by (162k points)
Can you post the log from the FTPClient listing as well so we can compare them? Thanks

Excuse for my bad bad english. I tryed to connect to my ftp server with ftpconnection (free library), i used the sample application downloaded from your site. When call getfiles() this is the trace log:

If i use the command line sample with ftpclient api i work correctly, whi ? What is the problem

PS I trye to use the active mode buth :( ?
Thanks
Stefano Paparesta
0 votes
by
This the log of FTPClient !

INFO [Demo] 24 ott 2005 22.23.14.827 : Connecting
DEBUG [EnterpriseDT.Net.Ftp.FTPClient] 24 ott 2005 22.23.14.837 : Connecting to XXX.XXX.XXX.XX:21
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 ott 2005 22.23.15.358 : 220 Serv-U FTP-Server v2.5i for WinSock ready...
INFO [Demo] 24 ott 2005 22.23.15.358 : Logging in
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 ott 2005 22.23.15.368 : ---> USER paparestas
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 ott 2005 22.23.15.628 : 331 User name okay, need password.
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 ott 2005 22.23.15.628 : ---> PASS ********
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 ott 2005 22.23.15.888 : 230 User logged in, proceed.
DEBUG [Demo] 24 ott 2005 22.23.15.888 : Setting up passive, ASCII transfers
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 ott 2005 22.23.15.888 : ---> TYPE A
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 ott 2005 22.23.16.139 : 200 Type set to A.
DEBUG [Demo] 24 ott 2005 22.23.16.149 : Directory before put:
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 ott 2005 22.23.16.149 : ---> PASV
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 ott 2005 22.23.16.409 : 227 Entering Passive Mode (XXX,XXX,XXX,XX,XX,XX)
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 ott 2005 22.23.16.649 : ---> LIST .
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 ott 2005 22.23.16.910 : 150 Opening ASCII mode data connection for /bin/ls.
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 ott 2005 22.23.17.290 : 226-Maximum disk quota limited to 2000000 Kbytes
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 ott 2005 22.23.17.290 :     Used disk quota 1000 Kbytes, available 1998999 Kbytes
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 24 ott 2005 22.23.17.290 : 226 Transfer complete.
DEBUG [EnterpriseDT.Net.Ftp.FTPClient] 24 ott 2005 22.23.17.290 : Found 7 listing lines
DEBUG [Demo] 24 ott 2005 22.23.17.300 : total 2
DEBUG [Demo] 24 ott 2005 22.23.17.300 : drwxrwxrwx   1 user     group           0 Oct 24 13:23 .
DEBUG [Demo] 24 ott 2005 22.23.17.300 : drwxrwxrwx   1 user     group           0 Oct 24 13:23 ..
DEBUG [Demo] 24 ott 2005 22.23.17.300 : drwxrwxrwx   1 user     group           0 Oct 16 10:44 aspnet_client
DEBUG [Demo] 24 ott 2005 22.23.17.300 : drwxrwxrwx   1 user     group           0 Oct 24 09:33 awstats
DEBUG [Demo] 24 ott 2005 22.23.17.300 : -rwxrwxrwx   1 user     group         391 Oct 24 08:41 index.htm
DEBUG [Demo] 24 ott 2005 22.23.17.300 : -rwxrwxrwx   1 user     group           7 Oct 24 13:23 readme.txt
INFO [Demo] 24 ott 2005 22.23.17.300 : Putting file .........




Thanks Stefano
0 votes
by
Excuse me, i find this:

Hi PR1,

The history is that NLST used to simply return an empty listing if no files were found or a non-existent file was requested. This was changed with the release of v5.0.0.0, in January 2004, to return a 550 reply if no file(s) were found. The reason for the change was that both WU_FTPd and SunOS handle NLST this way. They are the most-used FTP servers for UNIX, and Serv-U pretends (as far as the clients are concerned) to be a UNIX FTP server. Serv-U's original NLST handling was breaking client-side scripts intended for use with WU_FTPd servers. So the decision was made to return a 550 reply to mimic the behavior of those UNIX servers.

Since the change (now 1 1/2 years ago) I've had exactly one (1) complaint of a user who had a client or script that did not take the 550 reply well. In other words, by and large the decision seems to have been the right one.

What I could do is change NLST handling to return an empty listing without an error reply in case either no argument is given (ie. list the current directory), a directory name is given as its argument, or the argument contains wildcards. Then if a specific file is requested and that file is not found I could return a 550 reply. That seems to solve the problem of WU_FTPd scripts. Would this also solve the problem for you?

-Rob-

http://forums.rhinosoft.com/showthread.php?t=27&highlight=NLST

Thanks
Stefano Paparesta
0 votes
by (162k points)
There's your answer. Upgrade to the later version of the server I suppose.

Excuse me, i find this:

0 votes
by
The FTP server is in hosting (webhost4life), i can't upgrade the version, I will use ftpclient. Question, all ftp sever implement NLST ????, only U-Serv don't implement this command, also in last version don't implement this ??
Tanks
Stefano Paparesta

Categories

...