Opened 5 years ago

Last modified 5 years ago

#10912 moreinfo Patch

CPFR and CPTO command (copy file on server)

Reported by: Julien Blitte Owned by:
Priority: normal Component: FileZilla Server
Keywords: CPFR CPTO copy Cc:
Component version: Operating system type: Windows
Operating system version:



A small patch regarding this both commands CPFR / CPTO that are *really missing* to the standard FTP protocol and be very usefull for FTP server.

But I know:

  • This is non standard and, AFAIK only proFTP has currently implemented this
  • Due to the functionality itself, this can be a huge security issue also, so code has to be checked and reviewed several times before being committed
  • Once again (don't hate me yet please) I did a quick patch using notepad, I need to verify if it's compiling and that it's working but I submit it here so at least it is saved somewhere for now.

Pending your feedback on the concept (adding a non RFC commands but a "defacto" FTP commands) and meanwhile I will try to submit a clean, working and tested patch.

Julien Blitte

Attachments (1)

Filezilla Server +CPFR CPTO commands.patch (3.2 KB ) - added by Julien Blitte 5 years ago.
Filezilla Server +CPFR CPTO commands (not tested yet)

Download all attachments as: .zip

Change History (2)

by Julien Blitte, 5 years ago

Filezilla Server +CPFR CPTO commands (not tested yet)

comment:1 by Tim Kosse, 5 years ago

Status: newmoreinfo

Is there any form of specification for the syntax of the CPFR and CPTO commands and what the commands are supposed to do?

About the patch, it fails to compile if FTP_STRICT is defined.

A big issue with the patch is the call to CopyFile which is a blocking call. While the file is being copied, which can take hours for large files on slow storage, the calling thread is unresponsive. This affects all other clients that are being served by the same thread. The copying needs to be changed to be asynchronous, cf. HASH.

Note: See TracTickets for help on using tickets.