PowerShell / PowerShell/Win32-OpenSSH

Multiple sftp-server.exe running and locking files

Open
#1,605 5 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.