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

前端 未结 8 965
花落未央
花落未央 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:50

    It's permission problem. It is not "classic" read/write permissions of apache user, but selinux one.

    Apache cannot write to files labeled as httpd_sys_content_t they can be only read by apache.

    You have 2 possibilities:

    1. label svn repository files as httpd_sys_content_rw_t:

      chcon -R -t httpd_sys_content_rw_t /path/to/your/svn/repo
      
    2. set selinux boolean httpd_unified --> on

      setsebool -P httpd_unified=1
      

    I prefer 2nd possibility. You can play also with other selinux booleans connected with httpd:

    getsebool -a | grep httpd
    

提交回复
热议问题