Kwaadpepper
Kwaadpepper

Reputation: 536

ProFTP uploads failure on replace

Does someone know if it is possible to have proftpd to behave like this:

If a file is replaced but upload failed, then keep the successfull old file.

To keep file integrity. It's because i'm using it with an app.

Upvotes: 0

Views: 551

Answers (1)

Castaglia
Castaglia

Reputation: 3089

For this, I would recommend using the following in your proftpd.conf:

HiddenStores on

The HiddenStores behavior sounds like what you want: the file being uploaded by the client is stored by proftpd in a temporary "hidden" file. When the upload completes successfully, that temporary file is atomically renamed into place. If the upload fails, then the temporary file is deleted.

Hope this helps!

Upvotes: 2

Related Questions