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

Re: svn commit: r1547866 - /subversion/trunk/subversion/libsvn_fs_fs/rep-cache.c

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Thu, 05 Dec 2013 14:30:23 +0000

Stefan Sperling <stsp_at_elego.de> writes:

> I think we do want umask permissions. The rep-cache is written by
> the server process, and there are cases where the group write bit
> must be set for this to work (e.g. in some svn+ssh setups). In any
> case the server process will have the proper umask configured, so
> we can just use it.
>
> Revision files are usually read-only so the story is different there.

Create a repository with group write access:

(umask 002 ; svnadmin create repo)

-rw-rw-r-- 1 pm pm 2 Dec 5 14:27 repo/db/current
-r--r--r-- 1 pm pm 115 Dec 5 14:27 repo/db/revs/0/0

Accidentally commit with umask denying all group/other access

(umask 077 ; svn mkdir -mm file://`pwd`/repo/A)

If we created the new files with umask permissions we would break future
group access, but we copy permissions and the group access is preserved:

-rw-rw-r-- 1 pm pm 2 Dec 5 14:28 repo/db/current
-r--r--r-- 1 pm pm 115 Dec 5 14:27 repo/db/revs/0/0
-r--r--r-- 1 pm pm 268 Dec 5 14:28 repo/db/revs/0/1

Ideally we would like to do something similar for the rep-cache but at
present we don't:

(umask 077 ; svn import repo/format -mm file://`pwd`/repo/A/f)

-rw-rw-r-- 1 pm pm 2 Dec 5 14:28 repo/db/current
-rw------- 1 pm pm 3072 Dec 5 14:28 repo/db/rep-cache.db
-r--r--r-- 1 pm pm 115 Dec 5 14:27 repo/db/revs/0/0
-r--r--r-- 1 pm pm 268 Dec 5 14:28 repo/db/revs/0/1
-r--r--r-- 1 pm pm 574 Dec 5 14:28 repo/db/revs/0/2

I think what we need to do is copy the permissions of an existing
read-write file such as db/current.

-- 
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*
Received on 2013-12-05 15:31:03 CET

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