目 录CONTENT

文章目录

svn sqlit:attempt to write a readonly database

过客
2021-08-17 / 0 评论 / 0 点赞 / 7 阅读 / 0 字

在CentOS上导入了一个svn仓库后,发现提交文件出现了post commit FS processing had error: sqlite:attempt to write a readonly database 的报错提示。

这是svn仓库中的db内某些文件的权限不对,无法写入导致的。

解决办法

进入仓库的db目录,查看db目录下的权限

cd /home/svn/test/db
ls -lrt

total 3408
-rw-r--rw- 1 root   root       0 Aug  2 21:34 write-lock
drwxr-srwx 3 root   root    4096 Aug  2 21:34 revs
drwxr-srwx 3 root   root    4096 Aug  2 21:34 revprops
-rw-r--rw- 1 root   root       5 Aug  2 21:34 fs-type
-rw-r--rw- 1 root   root       0 Aug  2 21:34 txn-current-lock
-rw-r--rw- 1 root   root       2 Aug  2 21:34 min-unpacked-rev
-rw-r--rw- 1 root   root    1959 Aug  2 21:34 fsfs.conf
-r--r--rw- 1 root   root      22 Aug  2 21:34 format
-rw-r--rw- 1 root   root      37 Aug  2 22:39 uuid
-rw-r--r-- 1 root   root 3444736 Aug  2 22:44 rep-cache.db
-rw-r--rw- 1 apache root       3 Aug 13 14:33 txn-current
-rw-r--rw- 1 apache root       4 Aug 13 14:33 current
drwxr-srwx 2 root   root    4096 Aug 13 14:33 txn-protorevs
drwxr-srwx 2 root   root    4096 Aug 13 14:33 transactions

可以看到rep-cache.db文件用户没有写的权限,添加一下就可以了

chmod 646 rep-cache.db

然后,再重新提交一下,这个错误就不存在了。

0
  1. 支付宝打赏

    qrcode alipay
  2. 微信打赏

    qrcode weixin

评论区