Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

My company is about to move to Subversion and the initial plan was to put a large amount of archive material in the repo, as well as our current work. The idea was that no one would ever want to checkout the archive but would instead browse it via their web browser.

We're concerned, however, that someone might accidentally checkout the whole archive (can't trust all of our users). Since our hosting agreement for the server has relatively low bandwidth limits, checking out the entire archive could blow the limit and cost us a lot of cash.

Is there anyway of providing read-only access to the archive via a web browser but prevent anyone from checking it out? I had a look at the available repository hooks and couldn't find anything useful. Any other ideas about how we could achieve our goal?

share|improve this question
add comment

4 Answers

up vote 3 down vote accepted

Have you checked out ViewVC? It can provide a nicely-formatted read-only view of your repo, and is quite configurable.

share|improve this answer
    
This looks like it could fit the bill very nicely. Will test it out now... –  James Tisato Feb 5 '10 at 6:02
    
If all you need is a web based browser ViewVC is great, & if your browser-users don't ever need to hit the actual repo you don't have to give them "real" SVN acess :-) –  voretaq7 Feb 5 '10 at 6:13
add comment

One way of doing this is through path-based authorization. This way you could setup the archives to be viewed only by those people in your team. Here is a page from the Subversion Red Book about Path-Based Authorization:

http://svnbook.red-bean.com/nightly/en/svn.serverconfig.pathbasedauthz.html

You will be able to set the permissions using what's called an authz file. Just make sure to test this with different users. Play with the different settings. Once the authorization settings are to your liking, then you can open your firewall port to the WAN.

Subversion has 2 servers, svnserve (svn:// protocol) and Apache-WebDAV (http:// protocol). I recommend that you use VisualSVN, if you choose the HTTP protocol. I have a product that handles the svnserve server. It's called PainlessSVN.

There's a couple places where you may be able to get help.

WanDisco Subversion Community

Subversion Forums

share|improve this answer
add comment

In the subversion contributions is a mod_dontdothat that might do what you ask. It is an optional apache module that allows denying operations like a checkout on the root of the repository.

share|improve this answer
add comment

Why not run your own 'svn export' and let Apache serve a copy? That way, they can't do a checkout because Subversion is completely out of the picture.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.