# Subversion help!

**URL:** <https://www.ruby-forum.com/t/subversion-help/77576>\
**Category:** Rails\
**Created:** [March 7, 2006, 2:17am UTC](https://www.ruby-forum.com/t/subversion-help/77576 "2006-03-07T02:17:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mshah](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ee7513/32.png) [@mshah](https://www.ruby-forum.com/u/mshah)\
**Post date:** [March 7, 2006, 2:17am UTC](https://www.ruby-forum.com/t/subversion-help/77576/1 "2006-03-07T02:17:28Z")

</div>

I created a subversion repository on my new vps and i’m trying to setup  
my  
rails app there. However i keep getting this error:

subversion/libsvn\_subr/io.c:2516: (apr\_err=13)  
svn: Can’t create directory  
‘/home/svnadmin/rapleaf/db/transactions/0-1.txn’:  
Permission denied

How do i fix this? I know others have had this before, so i would  
appreciate some help.

---

<div class="post-metadata">

**Author:** ![mshah](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ee7513/32.png) [@mshah](https://www.ruby-forum.com/u/mshah)\
**Post date:** [March 7, 2006, 3:14am UTC](https://www.ruby-forum.com/t/subversion-help/77576/2 "2006-03-07T03:14:44Z")

</div>

Hi !

2006/3/6, Manish S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> How do i fix this? I know others have had this before, so i would  
> appreciate some help.

Your permissions are hosed on your repository.

The Subversion book talks about permissions a bit in this section:  
[http://svnbook.red-bean.com/nightly/en/svn.serverconfig.multimethod.html](http://svnbook.red-bean.com/nightly/en/svn.serverconfig.multimethod.html)

In the end, it all depends on your server access method. If you use  
Apache/WebDAV, chmod -R all files in the repository so that your  
Apache user can read/write to the repository. Also make sure the  
folders are executable (makes them traversible).

Hope that helps !

---

<div class="post-metadata">

**Author:** ![mshah](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ee7513/32.png) [@mshah](https://www.ruby-forum.com/u/mshah)\
**Post date:** [March 7, 2006, 3:38am UTC](https://www.ruby-forum.com/t/subversion-help/77576/3 "2006-03-07T03:38:50Z")

</div>

2006/3/6, Manish S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> adduser svnadmin  
> [snip]  
> port = 3690  
> }

Your answer is here. chmod everything to svnadmin and you’ll be fine.

Bye !

---

<div class="post-metadata">

**Author:** ![mshah](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ee7513/32.png) [@mshah](https://www.ruby-forum.com/u/mshah)\
**Post date:** [March 7, 2006, 6:03am UTC](https://www.ruby-forum.com/t/subversion-help/77576/4 "2006-03-07T06:03:51Z")

</div>

Manish,  
After following Ezra’s excellent rails VPS tutorial on  
[http://brainspl.atI](http://brainspl.atI) setup subversion and really found the following  
mini-tutorial helpful (  
[Subversion Dev: svn+ssh Setup Mini-tutorial](http://svn.haxx.se/dev/archive-2004-03/0253.shtml)).  
Let me know if you have any questions after going through it. Nice to  
use  
svn+ssh and svnserve and not have to deal with apache.

Zack

---

<div class="post-metadata">

**Author:** ![mshah](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ee7513/32.png) [@mshah](https://www.ruby-forum.com/u/mshah)\
**Post date:** [March 7, 2006, 3:23am UTC](https://www.ruby-forum.com/t/subversion-help/77576/5 "2006-03-07T03:23:46Z")

</div>

i see that all the directories in the repository are owned by root.  
This is  
most likely why i cannot write to them. What user do i change the  
ownership  
too? Why did this happen to begin with. I followed these instructions:

1. wget the needed RPM files:  
Code:

wget  
[http://summersoft.fay.ar.us/pub/subversion/latest/redhat-9.0/bin/subversion-1.3.0-1.rh90.i386.rpm](http://summersoft.fay.ar.us/pub/subversion/latest/redhat-9.0/bin/subversion-1.3.0-1.rh90.i386.rpm)  
wget  
[http://summersoft.fay.ar.us/pub/subversion/latest/redhat-9.0/bin/apr-0.9.5-0.2.i386.rpm](http://summersoft.fay.ar.us/pub/subversion/latest/redhat-9.0/bin/apr-0.9.5-0.2.i386.rpm)  
wget  
[http://summersoft.fay.ar.us/pub/subversion/latest/redhat-9.0/bin/apr-util-0.9.5-0.1.i386.rpm](http://summersoft.fay.ar.us/pub/subversion/latest/redhat-9.0/bin/apr-util-0.9.5-0.1.i386.rpm)  
wget  
[http://summersoft.fay.ar.us/pub/subversion/latest/redhat-9.0/bin/neon-0.24.7-1.i386.rpm](http://summersoft.fay.ar.us/pub/subversion/latest/redhat-9.0/bin/neon-0.24.7-1.i386.rpm)

1. install them with rpm:  
Code:

rpm -Uvh apr-0.9.5-0.2.i386.rpm  
rpm -Uvh apr-util-0.9.5-0.1.i386.rpm  
rpm -Uvh neon-0.24.7-1.i386.rpm  
rpm -Uvh subversion-1.3.0-1.rh90.i386.rpm

1. Did it work?  
Code:

svn --version  
svn, version 1.3.0 (r17949)  
compiled Jan 2 2006, 17:22:43

Yay! We have subversion installed. Now to add it to xinetd so that it  
starts in inetd mode automatically. First, we’ll add a login for xinetd  
to  
run svnserve as:  
Code:

adduser svnadmin  
passwd svnadmin

Next, we’ll add the ports that xinetd is to forward to svnserve, in  
/etc/services.  
Code:

vi /etc/services

(I like vim, you can use pico or emacs or nano or whatever text editor  
it  
is that you like) and add the following two lines at the bottom:  
Code:

svnserve 3690/tcp #subversion  
svnserve 3690/udp #subversion

Save and quit. Next, we’ll add the xinetd script. Create the file with  
Code:

touch /etc/xinetd.d/svnserve

and then edit it with your favorite editor. With vi, it would be  
Code:

vi /etc/xinetd.d/svnserve

Paste this into the file:  
Code:

# default: on

# Subversion server

service svnserve  
{  
socket\_type = stream  
protocol = tcp  
user = svnadmin  
wait = no  
disable = no  
server = /usr/bin/svnserve  
server\_args = -i -r /home/svnadmin  
port = 3690  
}

Awesome. Now xinetd knows to start svnserve in inetd mode whenever  
someone  
connects to port 3690. Next, let’s reload xinetd:  
Code:

kill -SIGUSR2 `cat /var/run/xinetd.pid`

Next, let’s make sure xinetd is listening for 3690:  
Code:

netstat -anp | grep LISTEN | grep 3690

If you get nothing, you messed up one of the steps above. If you get a  
line  
that looks like this:  
Code:

tcp 0 0 0.0.0.0:3690 0.0.0.0:\*  
LISTEN 7136/xinetd

Then you are in business. Now to set up svnserve. First, let’s create a  
repository using the svnadmin _program_ (not to be confused with the  
svnadmin _user_):  
Code:

svnadmin create /home/svnadmin/mysvnrepo

Next, let’s set up the credentials for users connecting to it:  
Code:

vi /home/svnadmin/mysvnrepo/conf/svnserve.conf

paste in the following:  
Code:

[general]  
anon-access = none  
auth-access = write  
password-db = passwd  
realm = My Code Repository

Save and quit. Next, let’s create some users. Go into the svnserve  
passwd  
file to do it:  
Code:

vi /home/svnadmin/mysvnrepo/conf/passwd

Here is an example of what to do. The format is user = password:  
Code:

[users]  
Jane = mycat’sname  
Harry = i’msuchasexystud

I certainly hope you’ll use much better passwords than that  
Finally, to make sure everything works, install Subversion and  
TortoiseSVN,  
right click on your desktop, click TortoiseSVN-\>Browse Repo, and put in  
Code:

svn://mydomainname.com/mysvnrepo

---

<div class="post-metadata">

**Author:** ![mshah](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ee7513/32.png) [@mshah](https://www.ruby-forum.com/u/mshah)\
**Post date:** [March 7, 2006, 12:37pm UTC](https://www.ruby-forum.com/t/subversion-help/77576/6 "2006-03-07T12:37:24Z")

</div>

ok so i managed to setup my repository. Now i wanted to get apache  
going  
with regular cgi just to get things started.

I modified my httpd.conf file to include the stuff from the agile dev  
book.  
I changed the Doc root to be /myapp/public. I restarted apache.

I even created a symlink inside the public\_html directory to  
myapp/public

However when i browse to my ip address of the server (i havent setup the  
dns  
stuff yet) i get a default holding page that should only show when the  
domain has not been touched at all. At this point apache should read  
from  
myapp/public or error right?

what am i doing wrong? Please help…
