-
Notifications
You must be signed in to change notification settings - Fork 759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scp
locks the output file but it shouldn't
#2246
Comments
We don't believe this is a scp issue, we believe this is consistent behavior across Windows. If you copy the same large file from one location to another on your computer, can you open and read the file in the new location while it is being copied? |
You are correct that the same behavior exists across Windows. I have the same issue with the Just because it's consistent, it does not make it correct. There should be a way to disable the locking. If the desire is to make this tool more like Linux, then locking should be an opt-in feature. Regardless of whether it's opt-in or opt-out, there should be a way to disable locking. |
This usually comes down to the CreateFile API and whether the FILE_SHARE_READ and FILE_SHARE_WRITE flags were passed in. I don't recall if the fork is using CreateFile directly or using the POSIX-esque calls. |
Prerequisites
Steps to reproduce
scp "hostname:big_input_file" big_output_file
Expected behavior
I'm trying to download a big file with `scp` and read it during the download in another program. This works with `scp` in WSL, but not in Windows.
Actual behavior
In Windows, I can't read from the file because it gets locked by `scp`.
Error details
Environment data
Version
OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2
Visuals
No response
The text was updated successfully, but these errors were encountered: