atmoz / sftp

Securely share your files
https://hub.docker.com/r/atmoz/sftp/
MIT License
1.67k stars 832 forks source link

How to set .tmp file extension during file transfers #349

Open canelzio opened 2 years ago

canelzio commented 2 years ago

Hi All, I haven't try Atmoz SFTP server yet. Before do it I'd like to ask you if there is the possibility to set a tmp file extension during file transfer and rename the file to its original extension only after transfer is complete. In this way we can be sure to differentiate completed files from the others.

Obviously any other idea to accomplish this is welcome.

Thank you in advance.

mbonastre commented 1 month ago

Openssh does not use temp files during transfers. (It would be nice).

But you can achieve the same "manually":

put local_file.txt remote_file.txt.tmp
rename remote_file.txt.tmp remote_file.txt