Results 1 to 6 of 6

Thread: Apache + SVN + DAV on FreeBSD 8:txn-current-lock: Permission denied

  1. #1

    Apache + SVN + DAV on FreeBSD 8:txn-current-lock: Permission denied

    Hello!

    I have installed Subversion to the virtual private server running under FreeBSD 8. I can access my repository using DAV svn. I've added 2 users into the svn.passwd file (but not with 'adduser command'! they actually not existing on the server) and they can update their working copies now. But when I try to commit I see the message:

    Code:
    svn: Can't open file '/home/svn/km-cargo/db/txn-current-lock': Permission denied
    Apache config:

    Code:
    <Location /svn>
        DAV svn
        SVNParentPath /home/svn
        AuthType Basic
        AuthName "Subversion repository"
        AuthUserFile /usr/local/etc/svn.passwd
        Require valid-user
    </Location>
    Modules loaded:

    Code:
    LoadModule dav_module         libexec/apache22/mod_dav.so
    LoadModule dav_svn_module     libexec/apache22/mod_dav_svn.so
    LoadModule authz_svn_module   libexec/apache22/mod_authz_svn.so
    LoadModule dav_fs_module      libexec/apache22/mod_dav_fs.so
    Well, one thing I want to notice is that all of this worked well until I had logged in to the server and created there a few working copies of repository.

    P.S.
    Code:
    trans-mark# ll /home/svn/km-cargo/db/
    total 138
    -rw-r--r--  1 root  www       3 Nov  4 12:44 current
    -r--r--r--  1 www   www      22 Nov  4 11:17 format
    -rw-r--r--  1 www   www       5 Nov  4 11:17 fs-type
    -rw-r--r--  1 www   www    1959 Nov  4 11:17 fsfs.conf
    -rw-r--r--  1 www   www       2 Nov  4 11:17 min-unpacked-rev
    -rw-r--r--  1 root  www  118784 Nov  4 12:44 rep-cache.db
    drwxr-xr-x  3 www   www     512 Nov  4 11:17 revprops
    drwxr-xr-x  3 www   www     512 Nov  4 11:17 revs
    drwxr-xr-x  2 www   www     512 Nov  4 12:44 transactions
    -rw-r--r--  1 root  www       2 Nov  4 12:44 txn-current
    -rw-r--r--  1 www   www       0 Nov  4 11:17 txn-current-lock
    drwxr-xr-x  2 www   www     512 Nov  4 12:44 txn-protorevs
    -rw-r--r--  1 root  www      37 Nov  4 12:44 uuid
    -rw-r--r--  1 www   www       0 Nov  4 11:17 write-lock
    Apache is www:www.

  2. #2
    That's a OS permissions problem. In your case some parts of db/ are only writeable by root. When user www tries to write to them the write fails.

  3. #3
    Well, I tried this:
    Code:
    # find /home/svn/km-cargo/db/ -type f -exec chmod g+w {} \;
    # ll /home/svn/km-cargo/db/
    total 138
    -rw-rw-r--  1 root  www       3 Nov  4 12:44 current
    -r--rw-r--  1 www   www      22 Nov  4 11:17 format
    -rw-rw-r--  1 www   www       5 Nov  4 11:17 fs-type
    -rw-rw-r--  1 www   www    1959 Nov  4 11:17 fsfs.conf
    -rw-rw-r--  1 www   www       2 Nov  4 11:17 min-unpacked-rev
    -rw-rw-r--  1 root  www  118784 Nov  4 12:44 rep-cache.db
    drwxr-xr-x  3 www   www     512 Nov  4 11:17 revprops
    drwxr-xr-x  3 www   www     512 Nov  4 11:17 revs
    drwxr-xr-x  2 www   www     512 Nov  4 12:44 transactions
    -rw-rw-r--  1 root  www       2 Nov  4 12:44 txn-current
    -rw-rw-r--  1 www   www       0 Nov  4 11:17 txn-current-lock
    drwxr-xr-x  2 www   www     512 Nov  4 12:44 txn-protorevs
    -rw-rw-r--  1 root  www      37 Nov  4 12:44 uuid
    -rw-rw-r--  1 www   www       0 Nov  4 11:17 write-lock
    And permission still denied

  4. #4
    Code:
    # chmod 777 /home/svn/km-cargo/db/txn-current-lock
    now new error:

    Code:
    svn: Can't create temporary file from template '/home/svn/km-cargo/db/svn-XXXXXX': Permission denied

  5. #5
    You still have files owned by root. The usual way to set things up is:
    chown -R www:www /home/svn/km-cargo
    Any reason you are doing things differently?

  6. #6
    Philip, thank you for your answers, I have solved the problem : that was an issue specific to VDS provider. Owner should not be www:www but user:user registered in ISPManager panel. They told me that this happens in case of apache mpm-itk installed.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •