Subversion: Custom permission each user on specific folder in a repo
Ngày 9 tháng 9 năm 2014
You can custom read/write a specific user on a subfolder in side a repo, it will overwrite the global permission.
Such as:
Here is the solution:
Such as:
- User harry will have full permission on repo svn://localhost/myproject/trunk but not able to write/commit into svn://localhost/myproject/release
- User tom can read on both above branch but can commit only on svn://localhost/myproject/release
- And so on...
Here is the solution:
- Open the file conf/svnserve.conf inside your repo folder
- Find and uncomment below line:
authz-db = authz
- Create/Open file authz on same folder with svnserve.conf
- Create groups for users, such as I have 2 groups one is developer who can commit into trunk and deploymanager who can commit into release:
[groups] # harry, dev1, dev2, tom and man1 are username which is wrote in password-db, see this page if you don't know how to do it developer = harry, dev1, dev2 deploymanager = tom, man1
- Then specific the permission for each folder by add below line into bottom of authz file created above:
#Allow all user can read root folder, change myproject to your repo name [myproject:/] * = r
[myproject:/trunk] @developer = rw @deploymanager = r
[myproject:/release] @developer = @deploymanager = rw
- Restart your svnserv service to update the new setting
Đang tải dữ liệu...

Dù đây chỉ là blogs cá nhân nhưng chúng tôi rất sẵn lòng đón nhận những đóng góp của bạn bè, người thân, và bất cứ ai ghé thăm.