Subversion help!


#1

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.


#2

Hi !

2006/3/6, Manish S. 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

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 !


#3

2006/3/6, Manish S. removed_email_address@domain.invalid:

adduser svnadmin
[snip]
port = 3690
}

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

Bye !


#4

Manish,
After following Ezra’s excellent rails VPS tutorial on
http://brainspl.atI setup subversion and really found the following
mini-tutorial helpful (
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


#5

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
wget
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
wget
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


#6

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…