Advertisement

Subversion and FreeBSD

Started by September 26, 2005 02:55 PM
6 comments, last by gg83 19 years, 1 month ago
I've just installed a new FreeBSD 5.4 system and I want to run a subversion server on it. I sucessfully installed the subversion port and setup a repository but now I can't get another computer to connect to the server. At first I ran svnserve from the command line like so: svnserve -d -r /usr/local/repos and my svn client couldn't connect saying the connection had been refused which I found odd as there's nothing about firewalls in rc.conf and in /etc/defaults/rc.conf all three firewalls mentioned in the handbook are disabled. So I added this line to inetd.conf: svn stream tcp nowait root /usr/local/bin/svnserve svnserve -i -r /usr/local/repos. My client can now connect but it says the connection is read-only. Can anyone tell me how I can get this working and why it could only connect when I added a line to inetd?
Just to clear the basics first, you have chmodded the repo directory to the correct permissions?
www.aidanwalsh(.net)(.info)
Advertisement
Well root has write access to everything and svnserve is running as root so everything should be fine.
You probably did this, but just in case you overlooked it. I'll throw it out and ask if you have created users for svnserve and have set them to write access?

Built-in authentication and authorization
"Knowledge is of two kinds. We know a subject ourselves, or we know where we can find information upon it." - Samuel Johnson
Yeah I forget to set that up [grin] thanks.

I'd still like to know why it wouldn't connect until I had set it up to use inetd though.
Monder,

Since the 5 release branch, they integrated a firewall into the kernel. The inetd.conf is the firewall rules that it uses by default, so its a good thing :)

-brad

On a side note, sometimes the handbook is outdated, so you should read the UPDATES/COMMITS file in /usr/src, it tells you (pretty much) all the changes that happened.
-brad
Advertisement
Hmm out of interest how do I disable that firewall, a kernel recompile? I have no desire to I'm just interested [grin].
Quote: Original post by Galapaegos
Since the 5 release branch, they integrated a firewall into the kernel. The inetd.conf is the firewall rules that it uses by default, so its a good thing :)


/etc/inetd.conf has nothing to do with any of the firewalls offered by FreeBSD. inetd man page.

Quote: Original post by Monder
Hmm out of interest how do I disable that firewall, a kernel recompile? I have no desire to I'm just interested [grin].


There shouldn't be any firewall enabled by default unless you have enabled them in /etc/rc.conf with pf_enable, ipfw_enable, or firewall_enable. Depending on the firewall you choose.

My guess on your issue with why svnserve only worked with it being in inetd.conf is that you tried to run svnserve under your user account and not the account that had premission to the /usr/local/repos directory, probably root? Which you'd need to login as root, or su/sudo into root and run svnserve from there.

Here's a little rc.d script that if you put it into /usr/local/etc/rc.d as say svnserve.sh and marking it as executable

#!/bin/sh# PROVIDE: svnserve# REQUIRE: DAEMON LOGIN# KEYWORD: shutdown. /etc/rc.subrname="svnserve"rcvar=`set_rcvar`command="/usr/local/bin/${name}"load_rc_config $namerun_rc_command "$1"


Then you should be able to put in your /etc/rc.conf

svnserve_enable="YES"svnserve_flags="-d -r /usr/local/repos"


That will start up svnserve on bootup for ya, as I don't think subversion comes with a rc.d script. Which then you can do.

/usr/local/etc/rc.d/svnserve.sh // Shows you available commands/usr/local/etc/rc.d/svnserve.sh start // Starts svnserve/usr/local/etc/rc.d/svnserve.sh stop // Stops svnserve


Depending on your needs. I believe that'll work, if not, I'll look into it.
"Knowledge is of two kinds. We know a subject ourselves, or we know where we can find information upon it." - Samuel Johnson

This topic is closed to new replies.

Advertisement