Hello,

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
http://tech.erdelynet.com/cygwin-sshd.html.

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
User:           NT AUTHORITY\SYSTEM
Computer:       PILGRIM
Description:
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
/var/log/sshd.log.... 

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:

  C:\Cygwin
  C:\Cygwin\var
  C:\Cygwin\var\log

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
[EMAIL PROTECTED]

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply via email to