While using internal sftp server, need to access files outside chroot
Peter Stuge
peter at stuge.se
Mon Jun 18 20:19:48 EST 2012
John Olsson M wrote:
> What do you think of having the SFTP server temporarily rename the
> transfered file with a ".tmp" extension which is removed when
> transfer is completed?
What happens when I upload a file called foo.tmp ?
Even using inotify to know when a file gets closed does not tell the
full story - it is still unknown if the file was closed because the
SFTP upload finished successfully, or because it was aborted by the
client, or due to network error, or some other problem. :(
A reliable solution indeed requires sftp-server to take action in
order to signal successful vs. failed upload completion. I'd like
to use POSIX Message Queues for this, but they aren't widely
supported. :( It would work a treat on Linux however!
Please just verify your input and dismiss anything corrupt. This is
fundamental for any programming. Do it and you will be happier.
//Peter
More information about the openssh-unix-dev
mailing list