I setup a
Subversion repository on my Ubuntu system yesterday. Everything went smoothly for the most part.
I installed the
Subversion package with the following command. Included in the package was
svn,
svnadmin, &
svnserve.
sudo apt-get install subversion
I added a new
subversion user & group. I added the new subversion user, and myself, to the subversion group.
sudo useradd --password pass subversion
sudo groupadd subversion
sudo adduser subversion subversion
sudo adduser me subversion
I created a repository, changed ownerships, & permissions.
sudo svnadmin create /svn/myrepos
sudo chown -R me:subversion /svn/myrepos
sudo chmod -R 0770 /svn/myrepos
I modified the repositories
conf/passwd and
conf/svnserv.conf files to allow read-only access by anonymous users & write access for me.
I went in and modified certain files like
conf/passwd &
conf.svnserv.conf to
0440 (owner & group read-only)I started svnserve in the
/svn directory as the subversion user.
sudo su subversion
svnserve -d -r /svn
But when trying to checkout the repository with
Tortoise SVN on my Windows machine, I kept getting an error similar to the following.
Error Can't open file '/svn/format': Permission denied
Even when I chmod'ed the
format file to 0777, I still got the error.
Come to find out, it really had little to do with that file directly. What it did have to do with was the permissions of the user that started
svnserve & the directory svnserve was told to use as the repository root.
/svn had
0760 permissions, as soon as I gave my
subversion group execute permissions so the subversion user who is a member of the
subversion group & is starting the server could execute, it worked like a charm.
sudo chmod 0770 /svn