0

解释我的问题和服务器设置:

我的仓库在 /svn/repos/testrepo

我的结帐,也可以通过 apache http 访问,位于 /var/www/testsite

提交后:

#!/bin/sh
/svn/autoupdate/autoupdate

autoupdate.c,使用 make autoupdate 编译:

#include <stddef.h>
#include <stdlib.h>
#include <unistd.h>
int main(void)
{
  execl("/usr/bin/svn", "svn", "update","/var/www/testsite/",(const char *) NULL);
  return(EXIT_FAILURE);
}

在进行 post commit 时,会出现此错误:

错误:提交后挂钩失败(退出代码 1),输出:
错误:svn:E155004:运行 'svn cleanup' 以删除锁(输入 'svn help cleanup' 了解详细信息)
错误:svn:E155004:工作副本 '/var /www/testsite'锁定
错误:svn:E200031:sqlite [S8]:尝试写入只读数据库
错误:svn:E200031:其他错误:
错误:svn:E200031:sqlite [S8]:尝试写入只读数据库

当我通过 ssh 到 testsite 并进行 svn 更新时,一切都很好。此外,清理不会显示任何错误。

有人知道是什么问题吗?

4

1 回答 1

1
  • 这是因为在基于 linux 的操作系统中,/var/www/ 下的目录默认没有写权限。
  • 给/var/www/下的目录写权限 例如:如果目录是/var/www/下的xyz(目录结构是/var/www/xyz)。首先将目录更改为 /var/www/($ cd /var/www)。然后授予 xyz 目录的权限(sudo chmod -R 777 xyz/)
  • 尝试更新svn。
于 2015-09-15T14:29:37.913 回答