Skip to content

v9.4.0.0p1 and later enforce permissions on the logs folder, leading to undiagnosable crashes of the service after Windows Update #2282

Description

@seansaleh

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • Search the existing issues.

Steps to reproduce

  • Have OpenSSH working as a service
  • Update OpenSSH via Windows Updates from something older than v9.4.0.0p1 to something newer
  • Have the service fail to start because you had somehow created a logs folder at C:\ProgramData\ssh\logs without extremely locked down permissions (I'm unable to confirm this right now, but it could have even been created by running sshd.exe as a user, not as a service)

Expected behavior

Actual behavior

  • Service fails to start with error 1067: The process terminated unexpectedly
  • No logs show up in Event Viewer indicating why
  • Troubleshooting as per https://github.com/PowerShell/Win32-OpenSSH/wiki/Troubleshooting-Steps does not show any issues, sshd runs fine with psexec -s sshd.exe -d
  • It only gets fixed by either running the full install-ssh.ps1 or by doing rm C:\ProgramData\ssh\logs (and thus depending on the parent folder to have proper permissions)

Solutions

  • Validate that the issue is undiagnosable by running psexec -s sshd.exe -d successfully
  • Run the full install-ssh.ps1
    or
  • Run rm C:\ProgramData\ssh\logs (and thus depending on the parent folder to have proper permissions)

Error details

No response

Environment data

$PSVersionTable 

Name                           Value
----                           -----
PSVersion                      7.3.5
PSEdition                      Core
GitCommitId                    7.3.5
OS                             Microsoft Windows 10.0.20348
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Version

OpenSSH_for_Windows_9.5p1

Visuals

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions