无法在WIndows 7上将subversion svnservice作为服务启动,访问问题
尝试在 Windows 7 计算机上将 SVN 作为服务运行,我是唯一的用户。
首先尝试从 DOS 创建服务,它给了我这个错误
[SC] OpenSCManager FAILED 5:
Access is denied.
,所以我然后用“以管理员身份运行”启动 cmd 窗口,这成功了。
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
但它实际上并没有启动该服务,当我尝试从控制面板/服务启动它时,它抱怨
Error 5:Access Denied
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您尚未在 binpath 中指定任何可执行文件。将您的字符串与例如进行比较。 http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-serversetup -svnserve.html,其中路径包含 svnserve.exe。当然,该服务根本不会运行,它会尝试执行一个文件夹,也就是说......
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...
我在 Subversion 1.7.13 中也遇到了同样的问题。但是当我以管理员身份运行 cmd.exe 并使用“net start [servicename]”启动服务时,它工作正常。
在你的情况下,你应该运行“net start svnserve”
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"
当您运行 CollabNet Subversion 服务器安装程序时,为什么不让它为您创建服务呢?为此有一个复选框。
我会检查该服务配置为运行的用户。也许它无权访问该文件夹?也就是说,听起来您似乎无权启动服务,尽管我希望 Windows 会提示您。
尝试以管理员身份打开命令提示符并使用:
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:
启动服务要求与该服务关联的“登录”帐户具有“作为服务登录”权限。通常,如果您进入服务小程序并定义与该服务关联的用户(或仅使用“本地系统”),Windows 将自动授予该权限。您将看到一个对话框,其中显示“XXXX 已被授予作为服务登录的权利”。
定义正确的帐户后,请尝试再次启动该服务并查看错误是否再次出现。
如果仍然失败,请确保您为该服务指定的帐户有权访问与该服务关联的可执行文件并对其具有执行权限。
如果您的 Windows 计算机是定义了限制系统服务权限的组策略的域的成员,您可能仍会看到“访问被拒绝”错误。
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.