<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>intuitive engineering &#187; perl</title>
	<atom:link href="http://dougmunsinger.com/category/perl/feed" rel="self" type="application/rss+xml" />
	<link>http://dougmunsinger.com</link>
	<description>doug munsinger</description>
	<lastBuildDate>Mon, 07 Jun 2010 16:44:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>svnadmin.pl &#8211; perl cgi script to manage svn over apache</title>
		<link>http://dougmunsinger.com/2009/05/svnadmin.html</link>
		<comments>http://dougmunsinger.com/2009/05/svnadmin.html#comments</comments>
		<pubDate>Fri, 08 May 2009 15:29:58 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[apache2]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://dougmunsinger.com/?p=738</guid>
		<description><![CDATA[One of the tedious tasks in repository administration is managing users over repositories. Who has access to what repository and to what degree (read-only, or write). Subversion over apache2 allows a tremendous amount of control, down to individual directories within the repository. (see &#34;Per Directory Access Control&#34; in the subversion book). So far I haven&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>One of the tedious tasks in repository administration is managing users over repositories.  Who has access to what repository and to what degree (read-only, or write).  Subversion over apache2 allows a tremendous amount of control, down to individual directories within the repository. (see <a title="per directory access control" href="http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.serverconfig.httpd.authz.perdir">&quot;Per Directory Access Control&quot; in the subversion book</a>).</p>
<p>So far I haven&#8217;t placed that but I have set up a default deny and then separate htpasswd files for read, or write access permission. This does at times cause TWO passwords to need to be used to first read and then again write to a repository.  However, these are cached, so we&#8217;ll see how much developers find to complain about in that.</p>
<p>The script svnadmin.pl assumes that a naming convention for the relationship bewtween htpasswd access files and subversion repositories is set so that the htpasswd file is named &lt;repository_name&gt;_read and &lt;repository_name&gt;_write.  You need to setthe path to htpasswd, the path to the htpasswd files, and a location for the top level directory of subversion &#8211; the parent directory for all repositories. Within the script you&#8217;ll also need to set the paths for the css file ($css) and for the header image ($headerimg).  This image should be roughly 420 px wide x 200 px high.  I used my corporate logo.</p>
<p>The script also uses a username-as-corporate-ID assumption (begins with &quot;a&quot; or &quot;d&quot; or &quot;x&quot;, contains up to eight characters), and a reasonable password assumption (at least 8 charcaters, nor more than 12, must contain at least one capital letter and one digit).  This is for internal use, not to be exposed, so if you are going to do something like this on ethe internet, you would want to revisit that and lock it down further.</p>
<h3><a title="svnadmin.pl" target="blank" href="http://dougmunsinger.com/images/posts/2009/svnadmin_pl.txt">svnadmin.pl</a></h3>
<h3><a title="main.css" target="blank" href="http://dougmunsinger.com/images/posts/2009/main.css.txt">main.css</a></h3>
<p>To run the script &#8211; save-file-as and then change the first line to &quot;#! /usr/bin/perl&quot; (or the appropriate path for the perl you want to use).  This is basically removing the extra &quot;#&quot; mark.   Rename the script to &quot;svnadmin.pl&quot;, put in your cgi-bin location, and put the main.css file in an appropriate location.  Edit the variables as above.</p>
<p>Screenshots:</p>
<table>
<tbody>
<tr>
<td><a title="screenshot 1" href="http://dougmunsinger.com/images/posts/2009/svnadmin_1.png" rel="shadowbox[post-738];player=img;"><img rel="lightbox[svn]" alt="screenshot" title="screenshot" src="http://dougmunsinger.com/images/posts/2009/svnadmin_1_220.png" /></a></td>
<td><a title="screenshot 1" href="http://dougmunsinger.com/images/posts/2009/svnadmin_2.png" rel="shadowbox[post-738];player=img;"><img rel="lightbox[svn]" alt="screenshot" title="screenshot" src="http://dougmunsinger.com/images/posts/2009/svnadmin_2_220.png" /></a></td>
</tr>
<tr>
<td><a title="screenshot 1" href="http://dougmunsinger.com/images/posts/2009/svnadmin_3.png" rel="shadowbox[post-738];player=img;"><img rel="lightbox[svn]" alt="screenshot" title="screenshot" src="http://dougmunsinger.com/images/posts/2009/svnadmin_3_220.png" /></a></td>
<td><a title="screenshot 1" href="http://dougmunsinger.com/images/posts/2009/svnadmin_4.png" rel="shadowbox[post-738];player=img;"><img rel="lightbox[svn]" alt="screenshot" title="screenshot" src="http://dougmunsinger.com/images/posts/2009/svnadmin_4_220.png" /></a></td>
</tr>
</tbody>
</table>
<p>Really fairly simple. This started with a script called &quot;htpasswd.pl&quot; which I downloaded and reworked, then adapted to use CGI.pm for multi-screen form presentation.  That framework alone was work rediscovering.  I used a similar framework with perl DBI and mysql to do fluid reporting on large system installations 9 years ago.  It recurs.</p>
<p>&mdash; doug</p>

<div class="sociable">
<span class="sociable_tagline">
share:
	<span>These icons link to social bookmarking sites where readers can share and discover new web pages.</span>
</span>
<ul>
	<li><a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fdougmunsinger.com%2F2009%2F05%2Fsvnadmin.html&amp;title=svnadmin.pl%20-%20perl%20cgi%20script%20to%20manage%20svn%20over%20apache" title="Digg" onfocus="sociable_description_link(this, 'bodytext')" rel="nofollow" target="_blank"><img src="http://dougmunsinger.com/wp-content/plugins/sociable-zyblog-edition/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a href="http://del.icio.us/post?url=http%3A%2F%2Fdougmunsinger.com%2F2009%2F05%2Fsvnadmin.html&amp;title=svnadmin.pl%20-%20perl%20cgi%20script%20to%20manage%20svn%20over%20apache" title="del.icio.us" rel="nofollow" target="_blank"><img src="http://dougmunsinger.com/wp-content/plugins/sociable-zyblog-edition/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a href="http://www.stumbleupon.com/submit.php?url=http://dougmunsinger.com/2009/05/svnadmin.html" title="StumbleUpon" rel="nofollow" target="_blank"><img src="http://dougmunsinger.com/wp-content/plugins/sociable-zyblog-edition/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
	<li><a href="http://reddit.com/submit?url=http%3A%2F%2Fdougmunsinger.com%2F2009%2F05%2Fsvnadmin.html&amp;title=svnadmin.pl%20-%20perl%20cgi%20script%20to%20manage%20svn%20over%20apache" title="Reddit" rel="nofollow" target="_blank"><img src="http://dougmunsinger.com/wp-content/plugins/sociable-zyblog-edition/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a href="http://www.bloglines.com/sub/http://dougmunsinger.com/2009/05/svnadmin.html" title="Bloglines" rel="nofollow" target="_blank"><img src="http://dougmunsinger.com/wp-content/plugins/sociable-zyblog-edition/images/bloglines.png" title="Bloglines" alt="Bloglines" class="sociable-hovers" /></a></li>
	<li><a href="mailto:?subject=svnadmin.pl%20-%20perl%20cgi%20script%20to%20manage%20svn%20over%20apache&amp;body=http%3A%2F%2Fdougmunsinger.com%2F2009%2F05%2Fsvnadmin.html" title="email" onfocus="sociable_description_link(this, 'E-mail this story to a friend!')" rel="nofollow" target="_blank"><img src="http://dougmunsinger.com/wp-content/plugins/sociable-zyblog-edition/images/email.png" title="email" alt="email" class="sociable-hovers" /></a></li>
	<li><a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fdougmunsinger.com%2F2009%2F05%2Fsvnadmin.html" title="Facebook" rel="nofollow" target="_blank"><img src="http://dougmunsinger.com/wp-content/plugins/sociable-zyblog-edition/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a href="http://faves.com/Authoring.aspx?u=http%3A%2F%2Fdougmunsinger.com%2F2009%2F05%2Fsvnadmin.html&amp;title=svnadmin.pl%20-%20perl%20cgi%20script%20to%20manage%20svn%20over%20apache" title="Faves" rel="nofollow" target="_blank"><img src="http://dougmunsinger.com/wp-content/plugins/sociable-zyblog-edition/images/faves.png" title="Faves" alt="Faves" class="sociable-hovers" /></a></li>
	<li><a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fdougmunsinger.com%2F2009%2F05%2Fsvnadmin.html&amp;title=svnadmin.pl%20-%20perl%20cgi%20script%20to%20manage%20svn%20over%20apache&amp;source=intuitive+engineering&amp;summary=EXCERPT" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://dougmunsinger.com/wp-content/plugins/sociable-zyblog-edition/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fdougmunsinger.com%2F2009%2F05%2Fsvnadmin.html&amp;title=svnadmin.pl%20-%20perl%20cgi%20script%20to%20manage%20svn%20over%20apache" title="Mixx" rel="nofollow" target="_blank"><img src="http://dougmunsinger.com/wp-content/plugins/sociable-zyblog-edition/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a></li>
	<li><a href="http://www.netscape.com/submit/?U=http%3A%2F%2Fdougmunsinger.com%2F2009%2F05%2Fsvnadmin.html&amp;T=svnadmin.pl%20-%20perl%20cgi%20script%20to%20manage%20svn%20over%20apache" title="Netscape" rel="nofollow" target="_blank"><img src="http://dougmunsinger.com/wp-content/plugins/sociable-zyblog-edition/images/netscape.gif" title="Netscape" alt="Netscape" class="sociable-hovers" /></a></li>
	<li><a href="http://www.newsider.de/submit.php?url=http%3A%2F%2Fdougmunsinger.com%2F2009%2F05%2Fsvnadmin.html" title="Newsrider" rel="nofollow" target="_blank"><img src="http://dougmunsinger.com/wp-content/plugins/sociable-zyblog-edition/images/newsrider.png" title="Newsrider" alt="Newsrider" class="sociable-hovers" /></a></li>
	<li><a href="http://slashdot.org/bookmark.pl?title=svnadmin.pl%20-%20perl%20cgi%20script%20to%20manage%20svn%20over%20apache&amp;url=http%3A%2F%2Fdougmunsinger.com%2F2009%2F05%2Fsvnadmin.html" title="Slashdot" rel="nofollow" target="_blank"><img src="http://dougmunsinger.com/wp-content/plugins/sociable-zyblog-edition/images/slashdot.png" title="Slashdot" alt="Slashdot" class="sociable-hovers" /></a></li>
	<li><a href="http://technorati.com/faves?add=http%3A%2F%2Fdougmunsinger.com%2F2009%2F05%2Fsvnadmin.html" title="Technorati" rel="nofollow" target="_blank"><img src="http://dougmunsinger.com/wp-content/plugins/sociable-zyblog-edition/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li><a href="http://twitter.com/home?status=http%3A%2F%2Fdougmunsinger.com%2F2009%2F05%2Fsvnadmin.html" title="TwitThis" rel="nofollow" target="_blank"><img src="http://dougmunsinger.com/wp-content/plugins/sociable-zyblog-edition/images/twitter.png" title="TwitThis" alt="TwitThis" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://dougmunsinger.com/2009/05/svnadmin.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.426 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-07-29 18:56:22 -->
