Permission configuration: How to prohibit directories from being deleted

yipianlvye
yipianlvye
Dear Sir: How do you do? Environment description: Visual SVN Server 2.7.13, installed on Windows Server 2007 SP2 operating system.  Now I create a version library named code_eas, used to store source code and embedded software versions. Structure looks like this: 0----/code_eas 1.1-----------/dev1-code 1.1.1---------------/trunk 1.1.2---------------/branches 1.1.3---------------/tags 1.1.3.1------------------/test 1.1.3.2------------------/release 1.2-----------/dev2-code …… 1.N-----------/devN-code Setting R&D personnel's permissions are: dev1-code for read-only, trunk for read and write, tags and branches for read-only. Now we find that R&D personnel can delete trunk folders. How should we set permissions so that R&D personnel can not delete trunk folders but can submit source code in them?  Fervently hope expert’s advice. Your early reply will be highly appreciated. Thank you so much! Yours yipianlvye May 10th, 2019

Last updated

DougR
DougR
Subversion only has 3 privileges: none, read, read/write. In order to checkin you need read/write. So you can't prevent removal of something in trunk without disabling the ability to update trunk. What you can do with sub-repository AuthZ is to prevent *any* changes to anything within the tags directory (except by a privileged few). As of Subversion 1.10 you can do this with wildcards which will make your life ever-so-much easier.  As far as preventing trunk folders, you need to do this with a pre-commit hook that checks to make sure that your policy (e.g. no removal within trunk directory) is enforced. If the pre-commit hook exits non-zero then the operation will be prevented. Check out the web for examples.

1-4 of 4

Reply to this discussion

You cannot edit posts or make replies: You should be logged in before you can post.