Re: Subversion und Apache
Am Samstag, 7. April 2007 00:13 schrieb Thorsten Haude:
> Moin,
[...]
> >Subversion scheint auch so weit zu funktionieren. Apache meckert aber: "
> > Could not open the requested SVN filesystem"
>
> Was steht im Log?
Hier ein heutiger Auszug aus "/var/log/apache2/error.log":
[Sat Apr 07 09:19:55 2007] [notice] Apache/2.2.3 (Debian) DAV/2 SVN/1.4.2
configured -- resuming normal operations
[Sat Apr 07 10:58:51 2007] [error] [client 192.168.1.100] (20014)Internal
error: Can't open file '/var/lib/svn/Linux-Module_Programmierung/format': No
such file or directory
[Sat Apr 07 10:58:51 2007] [error] [client 192.168.1.100] Could not fetch
resource information. [500, #0]
[Sat Apr 07 10:58:51 2007] [error] [client 192.168.1.100] Could not open the
requested SVN filesystem [500, #2]
[Sat Apr 07 10:58:51 2007] [error] [client 192.168.1.100] Could not open the
requested SVN filesystem [500, #2]
[Sat Apr 07 10:59:01 2007] [error] [client 192.168.1.100] File does not
exist: /var/www/favicon.ico
> >Ich vermute ein Berechtigungsproblem unter meinem Subversion Repository
> >(Verzeichnis: "/var/lib/svn-repos").
>
> Unser Webserveruser (svnadmin) hat natürlich volle Zugriffsrechte auf
> alle entsprechenden Verzeichnisse. Ist das bei Euch gegeben?
Du meinst bei mir. ;-)
In der Anleitung an die ich mich gehalten habe, steht nichts von einem
eigenen "Webserveruser (svnadmin)". Ich habe nur eine Gruppe "subversion"
erstellt und mich in die Gruppe aufgenommen.
Ich bin so frei und poste einmal was ich bisher so gemacht habe:
1.) Debian Pakete installiert:
*) apache2-mpm-worker
*) libapache2-svn
*) subversion
*) apache2-doc
*) apache2-utils
*) subversion-tools
2.) Depot erstellt:
root@veneto:~# mkdir -pv /var/lib/svn-repos/
root@veneto:~# svnadmin create --fs-type
fsfs /var/lib/svn-repos/Linux-Module_Programmierung
3.) Gruppe für Subversion:
root@veneto:~# groupadd subversion
4.) Benutzer in Gruppe aufgenommen
root@veneto:~# adduser leo subversion
5.) Besitzer für Depot angepasst:
root@veneto:~# chown -Rv www-data:subversion /var/lib/svn-repos/*
root@veneto:~# chmod -Rv 770 /var/lib/svn-repos/*
root@veneto:~# chmod
a-x /var/lib/svn-repos/Linux-Module_Programmierung/{README.txt,format}
6.) SSH eingerichtet:
leo@veneto:~$ mkdir -pv ~/.ssh/
leo@veneto:~$ cd ~/.ssh/
leo@veneto:~$ ssh-keygen -t dsa
leo@veneto:~$ cat ~/.ssh/id_dsa.pub | ssh leo@veneto "cat - > >
~/.ssh/authorized_keys"
7.) Ein erster Test:
leo@veneto:~$ mkdir -pv ~/TEMP/
leo@veneto:~$ echo "testing svn" > ~/TEMP/testing.txt
leo@veneto:~$ svn import -m "importing test over ssh+svn" ~/TEMP/
svn+ssh://veneto/var/lib/svn-repos/Linux-Module_Programmierung/trunk
leo@veneto:~$ svn co
svn+ssh://veneto/var/lib/svn-repos/Linux-Module_Programmierung/trunk
testcheckout
root@veneto:~# svnlook tree /var/lib/svn-repos/Linux-Module_Programmierung/
8.) Subversion WebDAV eingerichtet
root@veneto:~# a2enmod dav
This module is already enabled!
root@veneto:~# a2enmod dav_svn
This module is already enabled!
root@veneto:~# mkdir -pv /etc/apache2/passwd
root@veneto:~# htpasswd -c /etc/apache2/passwd/dav_svn.passwd leo
New password:
Re-type new password:
Adding password for user leo
root@veneto:~# vim /etc/apache2/mods-available/dav_svn.conf
<Location /svn>
DAV svn
SVNParentPath /var/lib/svn-repos
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/apache2/passwd/dav_svn.passwd
Require valid-user
</Location>
9.) Test von Subversion über http.
> Thorsten
LG,
Leonhard.
Reply to: