我最近将我的 svn 存储库顺利地移动到具有相同路径结构的新服务器。我更改了 DNS,以便域名指向新服务器(并且互联网 DNS 管道知道这一点)。因此,我不必更新工作副本的存储库 URL(在 svn 信息中)。我可以很好地签出新副本,但提交更改会给我错误:
me$ svn ci -m "testing svn ci on new server"
Sending trunk/www/index.php
Transmitting file data .svn: Commit failed (details follow):
svn: Can't open file '/var/svn/webrepo/db/txn-current-lock': Permission denied
好的,所以我尝试 sudo 相同的签入命令,但出现此错误:
svn: Commit failed (details follow):
svn: To better debug SSH connection problems, remove the -q option from 'ssh' in the [tunnels] section of your Subversion configuration file.
svn: Network connection closed unexpectedly
我在论坛中看到了类似的问题,解决方案为更新工作副本 URL 或修复远程权限。对于我来说,URL 应该没问题,但我一直在尝试修复权限。我可以与本地用户进行 ssh 正常连接。这是远程存储库权限:
drwxrwxr-x 6 svn svn 4096 Feb 20 07:33 webrepo
svn 组包含我通过 ssh 登录的远程用户帐户。我曾尝试直接对该用户以及 root 用户执行 chown'ing -R 操作,但没有成功。感谢您的帮助!
i recently moved my svn repositories to a new server with the same path structure without a hitch. i changed the DNS so that the domain name points to the new server (and the interweb DNS pipes are aware of this). therefore, i didn't have to update working copy's repo URL (in svn info). i can check out a new copy just fine, but committing a change gives me errors:
me$ svn ci -m "testing svn ci on new server"
Sending trunk/www/index.php
Transmitting file data .svn: Commit failed (details follow):
svn: Can't open file '/var/svn/webrepo/db/txn-current-lock': Permission denied
ok, so i try to sudo the same check-in command, with this error:
svn: Commit failed (details follow):
svn: To better debug SSH connection problems, remove the -q option from 'ssh' in the [tunnels] section of your Subversion configuration file.
svn: Network connection closed unexpectedly
i've seen this similar problem in forums with a solution of either updating the working copy URL or fixing the remote permissions. the URL should be ok in my case, and I'm stuck trying to fix the permissions. i can ssh just fine with my local users. This is the remote repository permissions:
drwxrwxr-x 6 svn svn 4096 Feb 20 07:33 webrepo
the svn group contains my remote user account with which i ssh in. i have tried chown'ing -R to that user directly, as well as root and have had no luck. thanks for your help!
发布评论
评论(3)
将 svn 移动到在 Linux 上运行的新服务器后,我遇到了同样的问题。 SVN 以 www-data 用户身份运行回购协议和所有文件和子目录必须属于 www-data。大多数情况都是这样,但有些文件由 root 拥有。通过运行
它解决了我的问题。
I've had the same problem after moving svn to a new server running on linux. SVN runs as www-data user & the repo & all files & sub directories has to be owned by www-data. Mostly this is the case but some files where owned by root. By running
it solved my problem.
同一存储库中的所有文件都具有此权限:drwxrwxr-x?用于测试目的的用户是否属于适当的组?我的意思是,有了上面的权限,只有所有者用户和所有者组才有权写入文件,如果您尝试提交某些内容,则可能会导致麻烦。
您是否尝试过比较
两台机器上的
All the files in the same repo has this rights: drwxrwxr-x? And the user used for testing purpose is in the appropriate group? I mean with this rights above, only the owner user, and the owner group have the right to write files, and it can cause trouble, if you try to commit something.
Have you tried to compare
on the two machines?
您忘记以明文形式提及
阅读 Tunneling over SSH SVN 书中的主题,以便深入了解权限问题,主要围绕本文
和“SSH 配置技巧”
简而言之 - 你有错误的所有者,也许还有错误的权限
You forgot to mention in clear text
Read Tunneling over SSH topic in the SVN book in order to understand permissions issues in deep, mostly around this text
and "SSH Configuration Tricks"
In short - you have wrong owner, and maybe, bad permissions