[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: sqlite[S8]: attempt to write a readonly database

From: Adam Jensen <hanzer_at_riseup.net>
Date: Sun, 10 Apr 2016 18:03:53 -0400

On Sun, 10 Apr 2016 14:36:09 -0700
Joseph Bruni <jbruni_at_icloud.com> wrote:

> rep-cache couldn't be owned by root unless svnserve was running as root at the time it was last modified. You can change permissions to be correct, but there is some reason root was the UID at the time it was created. I'm not familiar with doas. I'm guessing it is similar to sudo? Maybe doas changes effective UID at odd times?

Thanks for the sanity check, it looks like I might have botched something early in the repository creation. My bad (It was my first time ;)

To verify (with svnserve running as user _svn):

doas -u _svn svnadmin create /var/svn/project-C
doas -u _svn vi /var/svn/project-C/conf/svnserve.conf

[general]
anon-access = none
auth-access = write
realm = minerva.bohemia.net
[sasl]
use-sasl = true
min-encryption = 128
max-encryption = 256

svn mkdir svn://minerva.bohemia.net/project-C/{trunk,tags,branches}
svn checkout svn://minerva.bohemia.net/project-C

Authentication realm: <svn://minerva.bohemia.net:3690> minerva.bohemia.net
Password for 'hanzer': **********

A project-C/tags
A project-C/trunk
A project-C/branches
Checked out revision 1.

cd project-C/trunk
touch foo
svn add foo
svn commit
Authentication realm: <svn://minerva.bohemia.net:3690> minerva.bohemia.net
Password for 'hanzer': **********

Adding foo
Transmitting file data .
Committed revision 2.

ls -la /var/svn/project-C/db
total 72
drwxr-sr-x 6 _svn _svn 512 Apr 10 17:51 ./
drwxr-xr-x 6 _svn _svn 512 Apr 10 17:48 ../
-rw-r--r-- 1 _svn _svn 2 Apr 10 17:51 current
-r--r--r-- 1 _svn _svn 22 Apr 10 17:48 format
-rw-r--r-- 1 _svn _svn 5 Apr 10 17:48 fs-type
-rw-r--r-- 1 _svn _svn 6838 Apr 10 17:48 fsfs.conf
-rw-r--r-- 1 _svn _svn 2 Apr 10 17:48 min-unpacked-rev
-rw-r--r-- 1 _svn _svn 3072 Apr 10 17:51 rep-cache.db
drwxr-xr-x 3 _svn _svn 512 Apr 10 17:48 revprops/
drwxr-xr-x 3 _svn _svn 512 Apr 10 17:48 revs/
drwxr-xr-x 2 _svn _svn 512 Apr 10 17:51 transactions/
-rw-r--r-- 1 _svn _svn 2 Apr 10 17:51 txn-current
-rw-r--r-- 1 _svn _svn 0 Apr 10 17:48 txn-current-lock
drwxr-xr-x 2 _svn _svn 512 Apr 10 17:51 txn-protorevs/
-rw-r--r-- 1 _svn _svn 37 Apr 10 17:48 uuid
-rw-r--r-- 1 _svn _svn 0 Apr 10 17:48 write-lock

All is good. Thanks!

BTW - doas is a very simple replacement for sudo. https://news.ycombinator.com/item?id=9914693
Received on 2016-04-11 00:04:05 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.