Re: Openssh server detect file transfer finished

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



Thanks, I'm using libcurl, and it's possible to rename after the
transfer is finished. I will test that.

Micka,

On Wed, Dec 2, 2020 at 10:50 AM Jochen Bern <Jochen.Bern@xxxxxxxxx> wrote:
>
> On 02.12.20 01:21, Micka wrote:
> > I've a directory that is watched for the event write-close.
> > When I get this event I assume that the file is received totally.
> > Is it correct?
>
> No, an open FD *will* eventually be closed, by the OS when the process
> terminates if need be. Unless the machine *crashes* in mid-operation, of
> course ...
>
> We do a lot of such transfers, and the (our) gold standard, if possible,
> is to do an upload-then-rename under client control, with the further
> processing stages on the server requiring a "non-temp name" match.
>
> (Since you didn't specify how exactly you transfer the data: This can be
> done with sftp and ssh(*), but not scp.)
>
> (*) E.g., a la "uuencode tempfile < sourcefile | ssh user@host "uudecode
> && mv tempfile finalfile", not that I'd *recommend* such an approach ...
>
> Regards
> --
> Jochen Bern
> Systemingenieur
>
> Binect GmbH
>
> _______________________________________________
> openssh-unix-dev mailing list
> openssh-unix-dev@xxxxxxxxxxx
> https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev



[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux