+1 vote

Hi,

I can confirm uploading a single file, downloading a single file and deleting a file all work fine, the only issue is uploading a pattern of files:

I am using the code in your on-line examples:

ftp.CreateFolder("Uploads")

Dim options As New LocalSearchOptions("*.txt", True)
ftp.UploadFiles("Uploads", "c:\", options)

The folder is created correctly - as I can confirm the folder looking on the server, but when the UploadFiles code is run the error message is returned is:

'Folder 'Uploads' does not exist on the server.'

Any ideas what I could be missing here as the Folder does exist in the location it created it in?

Below is the log

S : 220--------- Welcome to Pure-FTPd [privsep][TLS] ---------
S : 220 - You are user number 2 of 100 allowed.
S : 220 - Local time is now 21:54.Server port: 21.
S : 220 - This is a private system -No anonymous login
S : 220 - IPv6 connections are also welcome on this server.
S : 220 You will be disconnected after 15 minutes of inactivity.
C : AUTH TLS
S : 234 AUTH TLS OK.
C : USER XXXX
S : 331 User exchang OK. Password required
C : PASS XXXX
S : 230 OK.Current restricted directory is /
C : FEAT
S : 211 - Extensions supported:
S : UTF8
S : EPRT
S : IDLE
S : MDTM
S : SIZE
S : MFMT
S : REST STREAM
S : MLST type*; size *; sizd *; modify *; UNIX.mode *; UNIX.uid *; UNIX.gid *; unique *;
S : MLSD
S : PRET
S : AUTH TLS
S : PBSZ
S : PROT
S : TVFS
S : ESTA
S : PASV
S : EPSV
S : ESTP
S : 211 End.
C : OPTS UTF8 ON
S : 504 Unknown command
C : MKD Uploads
S : 257 "Uploads" : The directory was successfully created
C : MLST Uploads
S : 521 Data connection cannot be opened with this PROT setting.

An unhandled exception of type 'Limilabs.FTP.Client.FtpException' occurred in Ftp.dll: Folder 'Uploads' does not exist on the server.

by

1 Answer

0 votes
 
Best answer

I investigated it closely and your server acts incorrectly.

The main problem is your server returning this error message:
"521 Data connection cannot be opened with this PROT setting.":

C : MKD Uploads
S : 257 "Uploads" : The directory was successfully created
C : MLST Uploads
S : 521 Data connection cannot be opened with this PROT setting.

This server tries to establish a data connection in response to MLST command.
However, MLST command does not open data connection: it provides information about requested file
(for details see RFC 3659 - https://www.limilabs.com/ftp/rfc/3659 )

It seems that you have an old version of the server - you should update the server to the latest version.

There is a configuration switch in Ftp.dll that can disable usage of MLST command (in case it is implemented incorrectly by the server):

using(Ftp client = new Ftp())
{
    client.Configuration.DisableMLST = true;

    // ...
}
by (297k points)
...