1

I wonder, if FTP reserves full space and creates the file at once when trasfer starts or the target file is created only when upload is finished.

For example: I have a server sending a file via FTP to another server, where I have a script that processes files in specified directory that is running via cron every 5 minutes. Script uses directory listing to find the files, so here I need to be sure that the file is transfered completely before executing.

3
  • This likely depends on what FTP server you are using. A temp file would have to be created to act like a cache for the upload.
    – Ramhound
    Feb 7, 2014 at 13:40
  • The files are transfered from linux to windows(Win Server)
    – Vit Kos
    Feb 7, 2014 at 13:47
  • My comment was in reference to the ftp server software itself.
    – Ramhound
    Feb 7, 2014 at 14:50

1 Answer 1

3

It really depends on the ftp server you are using indeed as somebody already mentioned. But all the servers I saw usually do start directly writing to the disk so you should see immediately the file as soon as you start sending it. This way also if the connection gets interrupted you end up with a partial file (which eventually you can resume later)

Given your needs I'd suggest that you yourself send the file to a temporary name or directory on the server that are not matched by the program on the server and then rename it when you see the upload is finished.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .