0

I have installed subversion 1.6.17 on my server and clients use the SSH+SVN connection variant. Since install of a new OS (SLES 11), I'm frequently having problems with svn actions which end up in the following permission denied error:

svn: Berkeley DB error for filesystem '/local/Storage/svn/myproject-src.rep/db' while checkpointing after Berkeley DB transaction:
DB_RUNRECOVERY: Fatal error, run database recovery
svn: bdb: /local/Storage/svn/myproject-src.rep/db/log.0000007722: log file unreadable: Permission denied
svn: bdb: PANIC: Permission denied
svn: bdb: DB_ENV->log_newfh: 7722: DB_RUNRECOVERY: Fatal error, run database recovery
svn: bdb: txn_checkpoint: log failed at LSN [7722 196676]: DB_RUNRECOVERY: Fatal error, run database recovery

When I run the svnadmin recover command everything is fine again and the failing svn action can be executed successfully. My hypothesis is that every time when a log file is created, this error occurs! The recover command doesn't update any file permissions, but the new log file is modified. Moreover, every user connected via SSH is able to open and read the log files.

Every log file is created with the permissions -rw-r--r-- 1 root mygroup which indicates that it should be readable! I'm not sure if it should also be writable, so I wrapped the svn scripts in order to force the permissions -rw-rw-r--:

#!/bin/sh
umask 002
/usr/bin/svn_orig "$@"

Unfortunately, this doesn't change the permissions =(

Can anybody tell me what is going on?

1 Answer 1

0

Now I found a solution for my problem! I had to remount /local/Storage with ACL feature and set the default permission for my group.

I modified the /etc/fstab as follows (added acl):

/dev/xvdd            /local/Storage   ext3       defaults,acl          1 2

If you want to test it without rebooting, you can also use mount -o remount,acl /dev/xvdd. Then I changed the permissions of my repositories and set the ACL default permissions for the group.

$> find /local/Storage/svn/myproject-src.rep -type d -exec chmod 2770 {} \;
$> find /local/Storage/svn/myproject-src.rep -type f -exec chmod 660 {} \;
$> setfacl -R -d -m group::rwx /local/Storage/svn/myproject-src.rep
$> chgrp -R mygroup /local/Storage/svn/myproject-src.rep

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.