Anne M. Hammond wrote:
> Somewhat insidious in that some of the ownerships were preserved,
> but not all, plus none of the modes: (I don't know what current
> is used for, but obviously apache would not be able to write to it
> from an svnadmin load.)
>
> oldrepo:
> total 220
> drwxrwsr-x 5 apache apache 4096 Jun 29 01:16 .
> drwxrwsr-x 7 apache apache 4096 Nov 3 2006 ..
> -rw-rw-r-- 1 apache apache 13 Jun 29 01:16 current
> -r--rw-r-- 1 apache apache 2 Nov 3 2006 format
> -rw-rw-r-- 1 apache apache 5 Nov 3 2006 fs-type
> drwxrwsr-x 2 apache apache 94208 Jun 29 01:16 revprops
> drwxrwsr-x 2 apache apache 94208 Jun 29 01:16 revs
> drwxrwsr-x 2 apache apache 4096 Jun 29 01:16 transactions
> -rw-rw-r-- 1 apache apache 37 Nov 3 2006 uuid
> -rw-rw-r-- 1 apache apache 0 Nov 3 2006 write-lock
>
> newrepo:
> drwxr-sr-x 5 apache apache 4096 Jun 29 13:04 .
> drwxr-sr-x 7 apache apache 4096 Jun 29 12:41 ..
> -rw-r--r-- 1 root apache 13 Jun 29 13:04 current
> -r--r--r-- 1 apache apache 2 Jun 29 12:41 format
> -rw-r--r-- 1 apache apache 5 Jun 29 12:41 fs-type
> drwxr-sr-x 2 apache apache 135168 Jun 29 13:04 revprops
> drwxr-sr-x 2 apache apache 135168 Jun 29 13:04 revs
> drwxr-sr-x 2 apache apache 4096 Jun 29 13:04 transactions
> -rw-r--r-- 1 root apache 37 Jun 29 12:41 uuid
> -rw-r--r-- 1 apache apache 0 Jun 29 12:41 write-lock
That result doesn't surprise me too much... I would guess that the
parent directory is not set to 770 and that you ran the restore command
as root. It looks like the repository was originally setup with a chmod
value of 700. You may also be seeing (minor) issues in the db/revs
folder. I'm betting they're all owned by root and that Apache can't
write to existing revs files. In FSVS, this probably won't cause an
issue, except maybe you can't change older log messages.
Assuming your repositories are stored under /var/svn, I believe the
following would fix it:
# cd /var/svn
# chmod -R 770 newrepos
# chmod -R g+s newrepos/db
# chown -R apache:apache newrepos
The last step is mostly optional, because as long as the repository
folder is set as g+rw (a chmod of x7x), Apache won't care who currently
owns the "current" file.
...
Another thing that I do on all of our repositories is to create a new
unix group for each repository and use chgrp to make the repository
folder owned by that group. So for a repository named "newrepos", I'd
create a "svn-newrepos" group, add Apache's user account to the list of
members, then change group ownership on the repository folder.
Either:
# cd /var/svn
# chown -R apache:svn-newrepos newrepos
Or:
# cd /var/svn
# chgrp -R svn-newrepos newrepos
Probably overkill if Apache is your only access method, but required
(AFAIK) if you want to support multiple access methods (such as svn+ssh).
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jul 5 13:16:45 2007