This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

one solution for sshd/cygrunsrv win32 error 1062


As with many others on this list, I've encountered
the following seemingly inexplicable message....

 cygrunsrv: Error starting a service:
QueryServiceStatus:  Win32 error 1062:
 The service has not been started.

...when trying to start sshd (OpenSSH_3.5p1) on Win2K
after installing per the instructions at

Another clue was the following entry in the event log:

Event Type:	Error
Event Source:	sshd
Event Category:	None
Event ID:	0
Date:		2/7/2003
Time:		9:57:45 AM
Computer:	PILGRIM
The description for Event ID ( 0 ) in Source ( sshd )
cannot be found. The local computer may not have the
necessary registry information or message DLL files to
display messages from a remote computer. The following
information is part of the event: sshd : Win32 Process
Id = 0x740 : Cygwin Process Id = 0x740 : starting
service `l' failed: redirect_fd: open (1,
/var/log/sshd.log): 13, Permission denied.

So it appeared (after browsing the source code) that
cygrunsrv's function redirect_fd() was encountering an
error attempting to open a file descriptor for

Browsing through all the perm bits didn't show any
obvious issues (all dirs 755, and sshd.log owned and
rw by SYSTEM), and I spent a number of hours reading
posts in the archives to no avail.

Finally, I tried to look at it from a WinNT admin
perspective and instead of using bash/Cygwin, checked
permissions via Windows Explorer.

Nothing obvious here.... but just for the sake of
experiment, I used the "properties | Security"
dialogue to explicitly add Full Control for the SYSTEM
user to:


IT WORKED!  I can now successfully start up sshd as a
service.  I haven't seen this approach in the archive,
so I figured I'd contribute my $0.02.

- Evers

Evers J. Ding

Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.

Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]