[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Savannah-hackers-public] [Savannah-cvs] [63] Update AdminSvnImport
From: |
Bob Proulx |
Subject: |
Re: [Savannah-hackers-public] [Savannah-cvs] [63] Update AdminSvnImport notes. |
Date: |
Sun, 9 Feb 2014 17:24:06 -0700 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Karl Berry wrote:
> chmod g+w -R /srv/svn/$proj/db/re*
> It isn't necessary to explicitly chmod g+w the repository files
>
> I believe it is necessary. Anyway, it can't hurt, and if the
> permissions are wrong, commits fail. Not worth the hassle.
It isn't needed with the instructions above it. In which case simple
is better. It would only be needed if doing something different. If
using 'svnadmin create' for example to create the repository then it
will use root's current umask and group. But in that case more
commands are also needed in addition to the above because the group
also needs to be set. I would be happy to add a section concerning
that there.
chown -R $proj /srv/svn/$proj/db
chmod -R g+w /srv/svn/$proj/db/re*
find /srv/svn/$proj/db -type d -exec chmod g+s {} +
Except that has a potential race condition. To avoid that I think
this is always guarenteed to be safe.
find /srv/svn/$proj/db -type d -exec chmod g+ws {} +
find /srv/svn/$proj/db -type d -exec chgrp $proj {} +
find /srv/svn/$proj/db -type f -exec chgrp $proj {} +
> The lack of writability is a very unfortunate bug in some versions of
> svn, including the one that was deployed on savannah for ages (maybe not
> any more, I don't know).
I think there must have been an implementation problem on Savannah.
The entire purpose of svn is to be used as a shared central
repository. It wouldn't do if that didn't work. Although I don't
doubt that there may have been a problem on Savannah I am very
skeptical about it being in any version of svn itself. And I don't
recall having seen such a bug even in very early versions of svn.
Instead I suspect that people manually creating the repositories left
them half constructed creating the problem by not finishing the task.
If you create files as root then that isn't going to work. But in
that case the files also need to be chgrp'd to the project group user
too.
> Quite a while ago, I added a cron job on vcs that chmod's them all every
> so often, to avoid the issue recurring. Which it did, repeatedly.
Automation is a good thing. Among other things that cronjob would fix
any problems that were left behind by manual creation by root but then
not fixed up appropriately. So yay for automation! :-)
Thanks for the review!
Bob