SVN Issue

Discussion in 'Server Operation' started by uberamd, Sep 29, 2008.

  1. uberamd

    uberamd New Member

    I am having some problems with my SVN server, and it appears to be related to permissions.

    I followed this guide to a T: http://www.howtoforge.com/debian_subversion_websvn, I even tried it on 2 servers, same issue on both.

    When I make a commit to SVN, the permissions on the db/current file go bad. Thus, when using websvn, it gives me an error saying it doesnt have permission to read "/var/svn-repos/project_myproject/db/current"

    To fix this, I need to run: # chown -R www-data:subversion [path] as well as # chmod -R 770 [path]

    That fixes it. If I don't run that, permissions on the file are set to the user that did the SVN commit. What makes it baffling to me is that the user that does the commit is a member of the subversion group, so it is beyond me as to why this is happening.

    Can anyone offer any insight into this, I have done over an hour of searching and trying various tricks (even putting the two commands in a cron job that runs every minute as root, but that caused issues when doing the commit and gave permission problems during the commit causing it to error out then too) and gotten nowhere.

    Thanks in advance!
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Do you see anything related to this in your logs?
     
  3. uberamd

    uberamd New Member

    I went through most logs and I found nothing, Im not really sure which log this error would be located in.

    The websvn outputs this:
    Error running this command: svnlook youngest '/var/svn-repos//project_backupapp'

    svnlook: Can't open file '/var/svn-repos/project_backupapp/db/current': Permission denied


    And the output of that folder is:
    Code:
    provolone:/var/log# cd /var/svn-repos/project_backupapp/db/
    provolone:/var/svn-repos/project_backupapp/db# ls -la
    total 36
    drwxrwx--- 5 www-data subversion 4096 2008-09-30 10:25 .
    drwxrwx--- 7 www-data subversion 4096 2008-09-29 11:26 ..
    -rwxrwx--- 1 steve    steve         7 2008-09-30 10:25 current
    -rwxrwx--- 1 www-data subversion    2 2008-09-29 11:26 format
    -rwxrwx--- 1 www-data subversion    5 2008-09-29 11:26 fs-type
    drwxrwx--- 2 www-data subversion 4096 2008-09-30 10:25 revprops
    drwxrwx--- 2 www-data subversion 4096 2008-09-30 10:25 revs
    drwxrwx--- 2 www-data subversion 4096 2008-09-30 10:25 transactions
    -rwxrwx--- 1 www-data subversion   37 2008-09-29 11:26 uuid
    -rwxrwx--- 1 www-data subversion    0 2008-09-29 11:26 write-lock
    provolone:/var/svn-repos/project_backupapp/db# 
    
    Notice how the ownership on current is steve:steve. Thats what gets me, steve is a member of the subversion group however the group when doing the commit is changed to steve and not subversion.

    A solution that may work is doing commits via the www-data user (even though they are no-login right now), however then no name is associated with the commit as the commit user would be www-data and not the user who performed the commit.

    Arg, this is driving me nuts. I hate when I follow a guide word for word, and yet error comes up like this, and I cannot find a solution for the issue at hand.
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Can you try
    Code:
    chmod 777 current
    ?
     

Share This Page