Paul Taylor
Paul Taylor

Reputation: 13120

Unable to start subversion svnservice as a service on WIndows 7, access problem

Trying to run SVN as a service on a Windows 7 machine, Im the only user.

First tried to create service from DOS and it gave me this error

[SC] OpenSCManager FAILED 5:

Access is denied.

So I then start cmd window with Run as Administrator, and that worked.

c:\Apps\SourceControl\CollabNet Subversion Server>sc create svnserve binpath= "\"C:\Apps\SourceControl\CollabNet Subversion Server\" --service --root c:\code\SVN\Project" displaynam
e= "SVN" depend= tcpip start= auto
[SC] CreateService SUCCESS

But it hasnt actually started the service, and when I try to start it from the Control Panel/Services it complains

Error 5:Access Denied

Upvotes: 0

Views: 8786

Answers (4)

Lota Lota
Lota Lota

Reputation: 47

I had the same problem with Subversion 1.7.13. But when I ran cmd.exe as administrator and started the service with "net start [servicename]" it worked fine. In your case you should run "net start svnserve"

Upvotes: 1

You have not specified any executable in binpath. Compare your string with eg. http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-serversetup-svnserve.html, where the path contains svnserve.exe. Of course the service won't run at all then, it tries to execute a folder so to say...

Upvotes: 2

David W
David W

Reputation: 10184

Starting the service requires that the "logon" account associated with the service has "Log On as a Service" privilege. Normally, if you go into the Services applet and define the user to be associated with the service, (or simply use "Local System") Windows will grant that right automatically. You'll see a dialog that appears stating "XXXX has been granted Log On As a Service Right".

Once you've defined the proper account, try starting the service again and see if your error returns.

If it still fails, ensure the account you designated for the service has access to and Execute privileges over the executable associated with the service.

If your Windows computer is a member of a domain that has defined a Group Policy which restricts permissions on system services, you may still see the Access Denied error.

Upvotes: 0

Mark Phippard
Mark Phippard

Reputation: 10419

When you ran the CollabNet Subversion server installer, why not just allow it to create the service for you? There is a checkbox for this.

I would check the user that the service is configured to run with. Maybe it does not have access to the folder? That said, it sounds like you just do not have access to start a service, although I would have expected Windows to prompt you.

Try opening a command prompt as Administrator and use:

net start ServiceName

Upvotes: 0

Related Questions