Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Does WinSCP lock the file during SFTP?

Short answer: No.

Longer one:
WinSCP does not lock the file explicitly. Obviously particular implementation of the SFTP server may lock the file, when it is being accessed by SFTP client (WinSCP). It would be perfectly reasonable to do so.

SFTP client can lock the file explicitly with SFTP version 5. WinSCP does not support that yet. And note that the most widely used SFTP server, OpenSSH, does support SFTP version 3 only anyway.
TimU

Re: Does WinSCP lock the file during SFTP?

Good question! Something I hadn't considered in my implementation.
Martin, keen to hear your response please :)

The best reference I could find is way back from the v3.2 release notes:
"Uploaded partial file (with .filepart extension) is renamed to target name only after file is closed (SFTP only). This should eliminate problems on servers, where file locking is supported (Windows)."

This seems to indicate that the file lock is very much an S/FTP server function, rather than a WinSCP option... Which makes sense.
jkoser1

Does WinSCP lock the file during SFTP?

Hi.

We are currently trying to transfer files using WinSCP SFTP protocol. We are having a problem with the vendor pulling the file before we are able to remove the .filepart extension. Does WinSCP lock the file during file transfer and when does it release it - when the file is completely transferred and the .filepart extension removed, or does it release it when the file is transferred and then attempt to pull it again to do the rename/stripping of the filepart extension?

Thanks for your help.