<?xml version="1.0" encoding="utf-8"?>
			
			<rss version="2.0">
			<channel>
			<title>Wayne Graham&apos;s Blog - Subversion</title>
			<link>http://swem.wm.edu/blogs/waynegraham/index.cfm</link>
			<description>ColdFusion Development for Academic Libraries</description>
			<language>en-us</language>
			<pubDate>Sun, 22 Nov 2009 17:22:03 -0500</pubDate>
			<lastBuildDate>Tue, 06 Mar 2007 16:35:00 -0500</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>wsgrah@wm.edu</managingEditor>
			<webMaster>wsgrah@wm.edu</webMaster>
			
			
			
			
			
			<item>
				<title>Subversion with mod_security</title>
				<link>http://swem.wm.edu/blogs/waynegraham/index.cfm/2007/3/6/Subversion-with-modsecurity</link>
				<description>
				
				I ran into a bit of an issue while setting up a new subversion server today. On that box we&apos;re running &lt;a href=&quot;http://www.modsecurity.org/&quot;&gt;mod_security&lt;/a&gt; on all vhosts to add another layer of security to our web apps. I got everything configured with the the security, but when I was testing, I kept getting 403 errors when I attempted to get the files in anything other than a web browser.

After scratching my head for a while, I looked at the Apache logs, and noticed that mod_rewrite was causing the issue with lines like this:

&lt;code&gt;
[Tue Mar 06 13:46:46 2007] [error] [client xxx.xxx.xxx.xxx] mod_security: Access denied with code 403. Pattern match &quot;!(^$|^application/x-www-form-urlencoded$|^multipart/form-data)&quot; at HEADER(&quot;Content-Type&quot;) [severity &quot;EMERGENCY&quot;] [hostname &quot;svn.example.com&quot;] [uri &quot;/test&quot;]
&lt;/code&gt;

I stumbled on &lt;a href=&quot;http://blog.charlvn.za.net/2006/09/subversion-modsecurity.html&quot;&gt;Charl van Niekerk&apos;s&lt;/a&gt; entry on this. One of the comments suggested that the following is the bare minimum to run mod_security on a vhost running subversion:

&lt;code&gt;
SecFilterSelective REQUEST_METHOD &quot;^(PROPFIND|PROPPATCH)$&quot; allow
SecFilterSelective REQUEST_METHOD &quot;^(REPORT|OPTIONS)$&quot; allow
SecFilterSelective REQUEST_METHOD &quot;^(MKACTIVITY|CHECKOUT)$&quot; allow
SecFilterSelective REQUEST_METHOD &quot;^(PUT|DELETE|MERGE)$&quot; allow
&lt;/code&gt;

This should be in the first directives in your mod_security call:

&lt;code&gt;
&lt;IfModule mod_security.c&gt;

    # Enable ModSecurity
    SecFilterEngine On

    # Allow SVN requests
	SecFilterSelective REQUEST_METHOD &quot;^(PROPFIND|PROPPATCH)$&quot; allow
	SecFilterSelective REQUEST_METHOD &quot;^(REPORT|OPTIONS)$&quot; allow
	SecFilterSelective REQUEST_METHOD &quot;^(MKACTIVITY|CHECKOUT)$&quot; allow
	SecFilterSelective REQUEST_METHOD &quot;^(PUT|DELETE|MERGE)$&quot; allow

	...
	# rest of your directives
&lt;/IfModule&gt;
&lt;/code&gt;

If you run a Subversion repository and have run into this issue, these security filters should help!
				
				</description>
						
				
				<category>Apache</category>				
				
				<category>Server</category>				
				
				<category>Subversion</category>				
				
				<pubDate>Tue, 06 Mar 2007 16:35:00 -0500</pubDate>
				<guid>http://swem.wm.edu/blogs/waynegraham/index.cfm/2007/3/6/Subversion-with-modsecurity</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Cygwin to the Rescue!</title>
				<link>http://swem.wm.edu/blogs/waynegraham/index.cfm/2005/12/14/Cygwin-to-the-Rescue</link>
				<description>
				
				I had a local SVN repository that had a lot of large images in it (scans of letters to- and from- Thomas Jefferson) that I needed to remove from the repository on my local machine but keep the files. Normally, this is an export issue, however, we&apos;re talking about 800 hundred images that are around 40MB a piece. Needless to say this was going to take more time than I was willing to dedicate to the task.

This is where Cygwin came into play. I basically wanted to delete all of the .svn folders that Subversion creates when you add something to a repository. So, with a single line, I was able delete the folders for an operation that would have taken a few hours to complete with the export task. 

So, in case you ever find yourself needed a script like this, here you go (assuming you&apos;re in the directory you want to start deleting in):

&lt;code&gt;
find . -type d -name ?*.svn? -print0 | xargs -0 rm -rdf
&lt;/code&gt;

This also works wonders for deleting .DS_Store files that tend to get onto your servers when you have Mac users (just be sure to change the -type flag to f).
				
				</description>
						
				
				<category>Server</category>				
				
				<category>Web</category>				
				
				<category>Subversion</category>				
				
				<pubDate>Wed, 14 Dec 2005 15:53:00 -0500</pubDate>
				<guid>http://swem.wm.edu/blogs/waynegraham/index.cfm/2005/12/14/Cygwin-to-the-Rescue</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>One-Click Subversion Setup</title>
				<link>http://swem.wm.edu/blogs/waynegraham/index.cfm/2005/12/5/OneClick-Subversion-Setup</link>
				<description>
				
				I ran across a neat project this morning as I was rebuilding a server box to run Subversion called &lt;a href=&quot;http://svn1clicksetup.tigris.org/&quot;&gt;Svn1ClickSetup&lt;/a&gt;. Not only does it install the Windows binaries for SVN 1.2.3 and running SVN as a Windows Service, but also adds Tortoise SVN 1.2.5 from the single installer. The installer also walks you through creating a first repository with trunk, branches, and tags folders. 

If you have to set up Subversion to run on Windows, this is definately a time saver!
				
				</description>
						
				
				<category>Subversion</category>				
				
				<pubDate>Mon, 05 Dec 2005 11:09:00 -0500</pubDate>
				<guid>http://swem.wm.edu/blogs/waynegraham/index.cfm/2005/12/5/OneClick-Subversion-Setup</guid>
				
			</item>
			
		 	
			</channel></rss>