Can't open file 'svn/repo/db/txn-current-lock': Permission denied

前端 未结 8 911
花落未央
花落未央 2020-12-07 13:20

I have set up a Linux Server and installed Apache and SVN and dav_svn on it. Now, when I try to upload to https://x.x.x.x:x/svn/repo with Tortoise SVN I get

相关标签:
8条回答
  • 2020-12-07 13:57

    I also had this problem recently, and it was the SELinux which caused it. I was trying to have the post-commit of subversion to notify Jenkins that the code has change so Jenkins would do a build and deploy to Nexus.

    I had to do the following to get it to work.

    1) First I checked if SELinux is enabled:

        less /selinux/enforce
    

    This will output 1 (for on) or 0 (for off)

    2) Temporary disable SELinux:

        echo 0 > /selinux/enforce
    

    Now test see if it works now.

    3) Enable SELinux:

        echo 1 > /selinux/enforce
    

    Change the policy for SELinux.

    4) First view the current configuration:

        /usr/sbin/getsebool -a | grep httpd
    

    This will give you: httpd_can_network_connect --> off

    5) Set this to on and your post-commit will work with SELinux:

        /usr/sbin/setsebool -P httpd_can_network_connect on
    

    Now it should be working again.

    0 讨论(0)
  • 2020-12-07 14:10

    3 Steps you can follow

    1. chmod -R 775 <repo path>  
      ---> change permissions of repository
      
    2. chown -R apache:apache <repo path>  
      ---> change owner of svn repository
      
    3. chcon -R -t httpd_sys_content_t <repo path>  
      ----> change SELinux security context of the svn repository
      
    0 讨论(0)
提交回复
热议问题