What is svnserve's authz's path syntax on Windows?

614 Views Asked by At

Background

I have been running svnserve version 1.8.17 configuration management software on my windows intranet for years with now 10 PCs. The PCs use TortoiseSVN as the client. Now I need to add another user who has access only to a sub-folder. This means altering the authz file.

Problem

When I add a path to the authz file, I get error Invalid authz configuration. Here is my sanitized authz file:

[groups]
mygroup = rtischer
othergroup = smith

[/]
@mygroup = rw

# causes 'Invalid authz configuration' when these lines are included
[Hiveware:\Hiveware\bbb\ccc\projname]
@othergroup = rw

And the following are my sanitized paths:

C:\svn\Hiveware\conf\authz
C:\svn\Hiveware\db
C:\Hiveware\bbb\ccc\projname

The following text, taken from Subversion documentation page xxii, says my path syntax is correct:

For consistency, the examples in this book assume that the reader is using a Unix-like operating system and is relatively comfortable with Unix and command-line interfaces. That said, the svn program also runs on nonUnix platforms such as Microsoft Windows. With a few minor exceptions, such as the use of backward slashes () instead of forward slashes (/) for path separators, the input to and output from this tool when run on Windows are identical to that of its Unix counterpart.

I couldn't find out what those "minor exceptions" were though.

Question

Is there another syntax that works? Or is this really a bug after all these years?

1

There are 1 best solutions below

10
On BEST ANSWER

Please read SVNBook | Path-based authoriztion and consider examples given in this chapter.

# causes 'Invalid authz configuration' when these lines are included
[C:\aaa\bbb\ccc\smith]

The authz expects paths within the repository. It is OS-independent and has nothing to do with paths on your filesystem. Therefore, the line should look as follows

[REPOSITORYNAME:/MyProject/smith]

IMPORTANT: Paths is Subversion are case-sensitive. Therefore, you should make sure that paths in your authz file are correct.

Update

The directory at C:\svn\Hiveware\ is your repository. C:\Hiveware\bbb\ccc\projname is a path of a working copy checked out from a repository - it is irrelevant to the question.

When you use svnserve, the path to the authz file is specified in the svnserve.conf as value of the authz-db directive. Please make sure that the path is correct. You should also make sure that you correctly specify the repositories root -r when starting svnserve. In your case is has to point to C:\svn.

Assuming that everything else is correct, the line in your authz-db file should be as follows

[Hiveware:/bbb/ccc/projname]

Note forward slashes instead of back slashes and that the name of the repository is omitted after :. The name is already specified in the line and you don't need repeat it again.