Topic "Does WinSCP lock the file during SFTP?"

Author Message
jkoser1
[View user's profile]

Joined: 2011-12-21
Posts: 1
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.
TimU
[View user's profile]

Joined: 2012-01-30
Posts: 25
Location: Sydney
Good question! Something I hadn't considered in my implementation.
Martin, keen to hear your response please Smile

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.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
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.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License