Fervent Coder

Coding Towards Utopia...by Rob Reynolds
posts - 278 , comments - 431 , trackbacks - 0

My Links


Rob Reynolds

Subscribe to Fervent Coder RSS
Subscribe to Fervent Coder by Email

About Me

I manage several open source projects. Need...
   ...package management for Windows?
   ...automated builds?
   ...database change management (migrations)?
   ...your application to check email?
   ...a monitoring utility?

I also write for

Like what you are reading? Want to buy me a cup of coffee?
PayPal - The safer, easier way to pay online!


Post Categories


Enhancing VisualSVN Server to Allow Anonymous Access

Rick Strahl had a great recent post on Running VisualSVN Server for Subversion Source Control. I have been running VisualSVN Server for my repositories for a little while now and especially love how painless the setup is. Not to mention that VisualSVN Server is 100% free!

One part that I especially liked was the part I have been missing and that is anonymous access to repositories.  I have been thinking about having this for awhile and with Rick's post I was able to allow it:

Anonymous Repository Access

Speaking about authentication and repository access permissions, one thing that took me a while to get though is how to configure anonymous access. By default Visual SVN Server requires users to log in to access the repository, even when the Everyone account is set up with ReadOnly access. Unfortunately VisualSVN Server doesn't appear to provide an option to enable this functionality and it turned out to be a bit frustrating to set up the Everyone account with ReadOnly access and still be prompted for a required username and password. By default the Everyone account still needs to be an authenticated account.

As I mentioned I'm a dork when it comes to Apache configuration, but the fix for this is easy (thanks to Matthieu who commented on a previous post) by using Satisfy Any in the virtual directory configuration:

<Location /svn/>
  DAV svn

  SVNListParentPath on
  SVNParentPath "c:/SvnWestWind/"
  SVNIndexXSLT "/svnindex.xsl"
  SVNPathAuthz on

  AuthName "Subversion Repositories"
  AuthType Basic
  AuthBasicProvider file
  AuthUserFile "c:/SvnWestWind//htpasswd"
  AuthzSVNAccessFile "c:/SvnWestWind//authz"

  Satisfy Any
  Require valid-user


This is sweet! But in the comments on user asked how to do get the everyone set up and where to find the virtual directory configuration file.  I had the same questions, but after about 3 minutes I figured it all out.

How to Get the Anonymous Access Up and Running on VisualSVN Server

1. Edit the file as in Rick's Post. The file can be found here:

%VisualSVN Server Root Install Directory%\conf\httpd.conf (most likely C:\Program Files\VisualSVN Server\conf\httpd.conf).

2. After you edit the file, restart the service for good measure (may not be required).
3. Open VisualSVN Server MMC snap in and right click on Repositories. Select {Properties...}. To do this for a single repository (instead of all, just select the properties of that repository instead).

image image

4. Click {Add..} (on the Security tab).


5. Select Everyone. Click {OK}.


6. Change access to {Read Only}. Click {Apply}. Click {OK}.


7. Reload your web page or try to connect to the SVN repository with no username/password. You should be good to go! :D

Print | posted on Saturday, October 4, 2008 2:50 PM | Filed Under [ Code ApplicationsToysOther ]



# re: Enhancing VisualSVN Server to Allow Anonymous Access

Cool! Thanks for this post and the step by step.
10/4/2008 4:45 PM | Brian Boatright

# re: Enhancing VisualSVN Server to Allow Anonymous Access

I've been doign a slight variation to this for some time, but one thing that has annoyied me. If you do setup anon access, the WWW service of it will show everyone every repo in the site, regardless of their permissions. I've tried playing with the xsl files (anything not compiled), but jsut had no luck getting this changed. I really hope visualSVN is expanded to truely allow anon access in the future without such low level hacking.
10/21/2008 12:56 PM | Kevin Peno

# re: Enhancing VisualSVN Server to Allow Anonymous Access

P.S.: by "showing everyone every repo in the site", I meant that it will list them all if you go to the svn root, access to each is appropriately controlled.
10/21/2008 12:58 PM | Kevin Peno

# re: Enhancing VisualSVN Server to Allow Anonymous Access

@Kevin: You could limit this by putting "Everyone" ONLY in the repos you want to have complete anonymous access to.
10/21/2008 6:37 PM | Robz

# re: Enhancing VisualSVN Server to Allow Anonymous Access

Watch out during upgrades! You will need to edit the httpd.conf file again.
11/9/2008 8:51 AM | Robz

# re: Enhancing VisualSVN Server to Allow Anonymous Access

Good practice use httpd-custom.conf to customize VisualSVN Server, because it will not be overwritten on upgrade/reinstall. Just add something like this:
<Location /svn/>
Satisfy Any
11/18/2008 10:56 AM | Ivan Zhakov

# re: Enhancing VisualSVN Server to Allow Anonymous Access

@Ivan : Awesome! Thanks!
11/24/2008 12:46 AM | Robz

# re: Enhancing VisualSVN Server to Allow Anonymous Access

hi guys, I really need your help.

here is the problem: I have a software project in the repository but I don't want that some people access to one or more folders/files. If I set the security on those file everithing is ok. the problem is that, when I create a Branch I have to set again the security rule to access those critical folders/files. how can I do to ensure that access rules are inherited in the branch?

please help me!!

thank you very much!!

6/17/2009 7:47 AM | tommaso

# re: Enhancing VisualSVN Server to Allow Anonymous Access

@tommaso: What happens if they create the branch?

If you really want to limit access to folders/files - consider making those items an external DLL that you import into the project. In other words, those files/folders go into their own limited access repository.
8/2/2009 1:11 PM | Robz
Comments have been closed on this topic.

Powered by: