x/sys/windows/svc: Error 1053 could not start service when user assigned is not Local System Account or has no admin rights #45966
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
OS-Windows
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
golang.org/x/sys
.\example.exe install
services.msc
, findmy service
Local System Account
by default) (starts normally, no error)Log On
tabLog on as service
permission inLocal Security Policy
, but Windows will grant it automatically at this step if needed.What did you expect to see?
The example service
my service
to start normally.What did you see instead?
Windows popup error message:
also when starting from command line
.\example.exe start
:My investigation (possible reason)
I'm not a go developer, but tried to build the svc example from some previous versions of
golang.org/x/sys
based on the commits history and tracked down that this issue may because this commit on Oct 8, 2020: windows/svc: add IsWindowsService functionI assume because when building the svc example from one earlier state - right before that commit - this issue not exists, the service can start with my dedicated test user without any problem.
Real-world example of this issue (Gitea)
As I said I'm not a go developer (js actually), I am a user of a go project called Gitea, where me and many other users faced this problem with recent versions of Gitea and reported this issue first there. Gitea can be installed as a Windows service and it operated well for a long time. After our discussion, it became clear that the problem is independent of the Gitea code, so I was asked to report the issue here too.
My OS version
Windows 10 Pro version 20H2 build 19042.964
The text was updated successfully, but these errors were encountered: