Skip to content

Cannot restart sshd service after gaining access to log folder #2335

Closed
@hongshu-w

Description

@hongshu-w

Prerequisites

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

Steps to reproduce

Hi team,
We are facing an issue where the sshd service cannot be restarted after a user, other than the built-in administrator, gains write access to the log folder located under ProgramData\ssh.

Steps to Reproduce:

Navigate to the ProgramData\ssh folder.
A user (not the built-in administrator) attempts to gain write access to the log folder by clicking on it and selecting "Continue" to gain access.

Image

Attempt to restart the sshd service.

Image

Expected Result: The sshd service should restart successfully.

Actual Result: The sshd service fails to restart, even though the sshd executable works correctly.

Additional Information:
This issue is easily reproducible as any user can gain write access to the log folder by simply clicking on it and selecting "Continue".

Expected behavior

Can restart sshd service

Actual behavior

Restart-Service : Failed to start service 'OpenSSH SSH Server (sshd)'.

Error details

Restart-Service : Failed to start service 'OpenSSH SSH Server (sshd)'.
At line:1 char:1
+ Restart-Service sshd
+ ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OpenError: (System.ServiceProcess.ServiceController:ServiceController) [Restart-Service]
   , ServiceCommandException
    + FullyQualifiedErrorId : StartServiceFailed,Microsoft.PowerShell.Commands.RestartServiceCommand

Environment data

PS C:\Windows\system32> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.26100.10034
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.26100.10034
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Version

OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2

Visuals

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions