SVN server switches from SVN + SSH access to SVN access

Source: Internet
Author: User
Tags ssh access

根据客户需求现在需要把SVN的访问方式由原来的svn+ssh的方式变为单独的svn的方式,但是在切换的过程中遇到了几个问题,先做一个归纳。

关于如何在linux下搭建这两种方式的svn server,可以具体参考博文“Centos 下面搭建svn 服务”来搭建,

 

首先明确两种方式的访问原理,

svn:读取仓库下面的配置文件来达到成功访问

svn+ssh:利用linux用户,将其加入到svn组以达到成功访问

 

问题一:配好了svn访问方式之后,提示svn server拒绝访问,

    1,检查svn server是否启动 (svnserver -d -r your-repository)

    2,配置svn server的时候,在配置文件svnserver.conf里面可以注销authz-db参数

    3, 由于svn+ssh方式走的不是svn默认的端口,按svn方式访问的时候需要配置防火墙添加svn默认端口号3690

问题二:配好了svn访问方式之后,旧的svn+ssh的方式还可以访问:

    1,确保将linux用户从svn组中剔除(gpasswd -d user group [gpasswd -a user group是将用户user加入group组])

    在剔除之后去测试旧的svn+ssh的方式,居然还能正常访问,后来新增一个svn 测试账号(当然此处测试账号还是linux账号)在加入svn和没有加入svn组的情况下分别测试,显示是符合实际要求的,问题可能出在当前我使用的账号上面。

    经过查找发现是因为当前账号james.liu对svn repository有ACL权限导致

    2,检查svn repository的ACL 权限,看是否有linux账号对其有ACL权限

12345678 ......# owner: svn# group: svnuser::rwxuser:james.liu:rwxgroup::rwxmask::rwxother::r-x

 

删除用户james.liu的ACL权限

   setfacl -R -x u:james.liu svn-repository-path

最后发现并解决所有问题,一切达到预期效果

svn server从svn+ssh访问方式切换到svn访问

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.