PowerShell / PowerShell/Win32-OpenSSH
Multiple sftp-server.exe running and locking files
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 8.3k
- Forks
- 819
- PR merge metrics
- No merged PRs in 30d
Description
"OpenSSH for Windows" version
7.7.2.2
Server OperatingSystem
Windows Server 2019 Standard
Client OperatingSystem
Windows 10
What is failing
When a connection drops during file transfer sftp-server.exe stays alive and locks the file.
Expected output
Can remove or open files after failed transfer.
Actual output
Can not remove or open files and I have multiple sftp-server.exe running (over 10x). Can only remove or open the files if I kill all sftp-server.exe, which can lead to more corrupted files.
I have only one SFTP user connecting to our server.
The config is:
SyslogFacility LOCAL0
LogLevel INFO
AuthorizedKeysFile .ssh/authorized_keys
Subsystem sftp internal-sftp -d "D:\ftp\" -l INFO -f LOCAL0
PermitTunnel no
AllowAgentForwarding no
AllowTcpForwarding no
X11Forwarding no
AllowGroups mydomain\sftpuser
Match User mydomain\myuser
#PasswordAuthentication no
ForceCommand internal-sftp
ChrootDirectory D:\ftp\myuser
Match Group administrators
AuthorizedKeysFile __PROGRAMDATA__/ssh/administrators_authorized_keys
UPDATE:
I updated OpenSSH to 8.1.0.0 a few months ago. It was working fine but it is locking the files again.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing a dropped file transfer on Windows Server 2019 with the reported internal-sftp configuration, then inspect the surviving sftp-server.exe processes and file locks. Done means a failed transfer no longer leaves the file locked or requires killing all sftp-server.exe processes; the issue names no source file or test to begin from.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- backend, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100