<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Svn on Details...</title>
    <link>https://www.deepreflect.net/tags/svn/</link>
    <description>Recent content in Svn on Details...</description>
    <generator>Hugo</generator>
    <language>en-US</language>
    <copyright>Copyright © 2003 - 2026 Leonardo Rizzi</copyright>
    <lastBuildDate>Tue, 30 Jun 2026 03:28:29 +0200</lastBuildDate>
    <atom:link href="https://www.deepreflect.net/tags/svn/feed.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Configuring the svnserve daemon</title>
      <link>https://www.deepreflect.net/2009/03/29/configuring-the-svnserve-daemon/</link>
      <pubDate>Sun, 29 Mar 2009 12:59:32 +0000</pubDate>
       <guid isPermaLink="false">http://blog.deepreflect.net/?p=449</guid> 
      <description>&lt;ul&gt;
&lt;li&gt;Creating the repositories&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you have not created any subversion repositories yet, you can create one with svnadmin:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;# svnadmin create ~/my-repository&lt;/code&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Tweaking svnserve.conf&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Open up and edit the svnserve.conf file located in the $HOME/my-repo/conf/ directory.&lt;/p&gt;
&lt;p&gt;Sample $HOME/my-repo/conf/svnserve.conf&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[general]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# Path to the file containing svn users and passwords.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;password-db = $HOME/my-repo/conf/passwd
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# Authentication realm of the repository. Two repositories using the
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# same password-db should have the same realm.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;realm = My-test-repository
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# Deny all anonymous access
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;anon-access = none
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# Grant authenticated users read and write privileges
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;auth-access = write
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;Setting up password authentication&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Open up and edit the password-db file (ie. $HOME/my-repo/conf/passwd). A sample entry might look like this:&lt;/p&gt;</description>
      <content:encoded><![CDATA[<ul>
<li>Creating the repositories</li>
</ul>
<p>If you have not created any subversion repositories yet, you can create one with svnadmin:</p>
<p><code># svnadmin create ~/my-repository</code></p>
<ul>
<li>Tweaking svnserve.conf</li>
</ul>
<p>Open up and edit the svnserve.conf file located in the $HOME/my-repo/conf/ directory.</p>
<p>Sample $HOME/my-repo/conf/svnserve.conf</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-fallback" data-lang="fallback"><span style="display:flex;"><span>[general]
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span># Path to the file containing svn users and passwords.
</span></span><span style="display:flex;"><span>password-db = $HOME/my-repo/conf/passwd
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span># Authentication realm of the repository. Two repositories using the
</span></span><span style="display:flex;"><span># same password-db should have the same realm.
</span></span><span style="display:flex;"><span>realm = My-test-repository
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span># Deny all anonymous access
</span></span><span style="display:flex;"><span>anon-access = none
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span># Grant authenticated users read and write privileges
</span></span><span style="display:flex;"><span>auth-access = write
</span></span></code></pre></div><ul>
<li>Setting up password authentication</li>
</ul>
<p>Open up and edit the password-db file (ie. $HOME/my-repo/conf/passwd). A sample entry might look like this:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-fallback" data-lang="fallback"><span style="display:flex;"><span>[users]
</span></span><span style="display:flex;"><span>user1 = password1
</span></span><span style="display:flex;"><span>user2 = password2
</span></span></code></pre></div><ul>
<li>Starting up the server</li>
</ul>
<p>Run the server by invoking svnserve with the -d switch (daemon mode) and &ndash;listen-host 1.2.3.4 (substituting 1.2.3.4 for your v-host IP address).</p>
<p><code># svnserve -d --listen-host 1.2.3.4 -r $HOME/my-repo</code></p>
<p>To ensure that your svnserve gets started whenever the server is booted, you must add a @reboot line to your crontab. Use the crontab -e command to bring up your crontab in your favorite text editor and add the following line:</p>
<p><code>@reboot svnserve -d --listen-host 1.2.3.4 -r $HOME/my-repo</code></p>
<ul>
<li>Testing the server</li>
</ul>
<p>To test the server&rsquo;s functionality, you can create a working copy of your repository using your shell. The checkout command will create a working copy of the repository:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-fallback" data-lang="fallback"><span style="display:flex;"><span># svn co svn://your-domain.com/$HOME/my-repo my-working-dir
</span></span><span style="display:flex;"><span># cd my-working-dir
</span></span><span style="display:flex;"><span># echo &#34;foo bar&#34; test-file
</span></span><span style="display:flex;"><span># svn add test-file
</span></span><span style="display:flex;"><span># svn remove test-file
</span></span><span style="display:flex;"><span># svn commit
</span></span></code></pre></div>]]></content:encoded>
    </item>
    <item>
      <title>Configuring subversion access over HTTP/DAV</title>
      <link>https://www.deepreflect.net/2009/03/29/configuring-subversion-access-over-httpdav/</link>
      <pubDate>Sun, 29 Mar 2009 12:53:15 +0000</pubDate>
       <guid isPermaLink="false">http://blog.deepreflect.net/?p=446</guid> 
      <description>&lt;ul&gt;
&lt;li&gt;Creating the repository&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you have not created any Subversion repositories yet, you can create one with svnadmin:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;# svnadmin create ~/my-repository&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Adding mod_dav_svn to your httpd&lt;/p&gt;
&lt;p&gt;&lt;code&gt;# a2enmod mod\_dav\_svn&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;If you plan to use fine-grained permissions, load mod_authz_svn.so as well:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;# a2enmod mod_authz_svn&lt;/code&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Configuring access to repositories&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;HTTP access to your repositories is defined using a &lt;code&gt;&amp;lt;Location&amp;gt;&lt;/code&gt; section in your httpd.conf.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;Location /myproject&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;DAV svn
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;SVNPath /home/myself/myrepos/myproject
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;AuthType Basic
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;AuthName &amp;#34;My project&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;AuthUserFile /home/myself/private/myproject.pw
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Order deny,allow
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;LimitExcept GET PROPFIND OPTIONS REPORT&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Require valid-user
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;/LimitExcept&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;/Location&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This entry would grant read-only access to everyone and write access to every user AuthUserFile. You can use the htpasswd utility to create or update this file, as described here.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<ul>
<li>Creating the repository</li>
</ul>
<p>If you have not created any Subversion repositories yet, you can create one with svnadmin:</p>
<p><code># svnadmin create ~/my-repository</code></p>
<p>Adding mod_dav_svn to your httpd</p>
<p><code># a2enmod mod\_dav\_svn</code></p>
<p>If you plan to use fine-grained permissions, load mod_authz_svn.so as well:</p>
<p><code># a2enmod mod_authz_svn</code></p>
<ul>
<li>Configuring access to repositories</li>
</ul>
<p>HTTP access to your repositories is defined using a <code>&lt;Location&gt;</code> section in your httpd.conf.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-fallback" data-lang="fallback"><span style="display:flex;"><span>&lt;Location /myproject&gt;
</span></span><span style="display:flex;"><span>DAV svn
</span></span><span style="display:flex;"><span>SVNPath /home/myself/myrepos/myproject
</span></span><span style="display:flex;"><span>AuthType Basic
</span></span><span style="display:flex;"><span>AuthName &#34;My project&#34;
</span></span><span style="display:flex;"><span>AuthUserFile /home/myself/private/myproject.pw
</span></span><span style="display:flex;"><span>Order deny,allow
</span></span><span style="display:flex;"><span>&lt;LimitExcept GET PROPFIND OPTIONS REPORT&gt;
</span></span><span style="display:flex;"><span>Require valid-user
</span></span><span style="display:flex;"><span>&lt;/LimitExcept&gt;
</span></span><span style="display:flex;"><span>&lt;/Location&gt;
</span></span></code></pre></div><p>This entry would grant read-only access to everyone and write access to every user AuthUserFile. You can use the htpasswd utility to create or update this file, as described here.</p>
<p>The next entry grants read/write access to users in the AuthUserFile, and no access to anyone else.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-fallback" data-lang="fallback"><span style="display:flex;"><span>&lt;Location /myproject&gt;
</span></span><span style="display:flex;"><span>DAV svn
</span></span><span style="display:flex;"><span>SVNPath /home/myself/myrepos/myproject
</span></span><span style="display:flex;"><span>AuthType Basic
</span></span><span style="display:flex;"><span>AuthName &#34;My project&#34;
</span></span><span style="display:flex;"><span>AuthUserFile /home/myself/private/myproject.pw
</span></span><span style="display:flex;"><span>Order deny,allow
</span></span><span style="display:flex;"><span>Require valid-user
</span></span><span style="display:flex;"><span>&lt;/Location&gt;
</span></span></code></pre></div><p>The previous examples all define access on a per-repository basis. It is also possible to grant access from specific users to specific areas of the repository, using fine-grained permissions.</p>
<ul>
<li>Testing the repository</li>
</ul>
<p>Using either a remote Subversion client or the standard svn command from your shell, you can generate your working copy of the repository with the checkout command. If you are accessing public data over a read-only account, you can use a standard http URL:</p>
<p><code># svn co http://your-domain/myproject/</code></p>
<p>If you are accessing private data or using a read/write account, make sure to use an https URL:</p>
<p><code># svn co https://your-domain/myproject/</code></p>
<p>The contents of public repositories are also accessible from a web browser. Keep in mind that search engines will try to index any public data, so you may want to use a robots.txt file.</p>
<ul>
<li>Using fine-grained permissions (optional)</li>
</ul>
<p>You can allow or deny specific users read/write privileges on specific items within a repository using AuthzSVNAccessFile. If you use this directive, make sure the mod_authz_svn module is loaded.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-fallback" data-lang="fallback"><span style="display:flex;"><span>&lt;Location /repos&gt;
</span></span><span style="display:flex;"><span>DAV svn
</span></span><span style="display:flex;"><span>SVNPath /home/myself/myrepos
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span># Access Control via the authz module.
</span></span><span style="display:flex;"><span>AuthzSVNAccessFile /home/myself/private/myrepos.acl
</span></span><span style="display:flex;"><span># Anonymous access is allowed. Prompt as needed.
</span></span><span style="display:flex;"><span>Satisfy Any
</span></span><span style="display:flex;"><span>Require valid-user
</span></span><span style="display:flex;"><span>AuthType Basic
</span></span><span style="display:flex;"><span>AuthName &#34;My subversion repositories&#34;
</span></span><span style="display:flex;"><span>AuthUserFile /home/myself/private/myrepos.pw
</span></span><span style="display:flex;"><span>&lt;/Location&gt;
</span></span></code></pre></div><p>The file specified in AuthzSVNAccessFile is a plain text file which defines fine-grained access lists. Note that all path names specified are relative to the SVNPath.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-fallback" data-lang="fallback"><span style="display:flex;"><span>#
</span></span><span style="display:flex;"><span># Allow anonymous read access to everything by default.
</span></span><span style="display:flex;"><span>#
</span></span><span style="display:flex;"><span>[/]
</span></span><span style="display:flex;"><span>\* = r
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>#
</span></span><span style="display:flex;"><span># Grant alice and bob write access to all of /myproject1/.
</span></span><span style="display:flex;"><span>#
</span></span><span style="display:flex;"><span>[/myproject]
</span></span><span style="display:flex;"><span>\* = r
</span></span><span style="display:flex;"><span>leo = rw
</span></span><span style="display:flex;"><span>temp = rw
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>#
</span></span><span style="display:flex;"><span># Grant carol and charlie write access to only /myproject/foo
</span></span><span style="display:flex;"><span>#
</span></span><span style="display:flex;"><span>[/myproject/foo]
</span></span><span style="display:flex;"><span>leo= rw
</span></span><span style="display:flex;"><span>temp = rw
</span></span></code></pre></div>]]></content:encoded>
    </item>
  </channel>
</rss>
