Here are the steps to get SVN running over SSH. If someone has a better idea, I would be glad for a update post here.
1) Enable SSH on the Synology Managment UI under Network Services -> Terminal.
2) Create a user under Privileges -> User. In the examples here, I will use
JohnDoe.
3) Create a folder for Subversion repositories from Privileges -> Shared Folder, I will use
svn. In comparison to inet.d method, here it does not matter what permissions you give under Management UI for this folder.
4) SSH to your Synology (if using Windows, use PuTTY for example), log in as user
root, use the admin password.
5) Install the ipkg system (see Synology Wiki for that
http://www.synology.com/wiki/index.php/Overview_on_modifying_the_Synology_Server%2C_bootstrap%2C_ipkg_etc)
6) Install subversion with
- Code: Select all
ipkg install subversion
7) Install bash with
- Code: Select all
ipkg install bash
8) If you don't like editing files with
vi, better also install
emacs with:
- Code: Select all
ipkg install emacs
at this stage.
9) Create /user folder with
- Code: Select all
mkdir /user
10) Create /user/JohnDoe folder with
- Code: Select all
mkdir /user/JohnDoe
11) Set ownership for the folder with:
- Code: Select all
chown JohnDoe.root /user/JohnDoe
12) Edit
/etc/passwd with
- Code: Select all
emacs /etc/passwd
so that the line for
JohnDoe looks like:
- Code: Select all
JohnDoe:x:<Number>:<Group>:John Doe:/user/JohnDoe:/opt/bin/bash
where you should keep the <Number> and <Group> fields as they are.
13) Create
/user/JohnDoe/.bashrc with content
export PATH=/opt/bin:$PATH with
emacs or by issuing:
- Code: Select all
echo "export PATH=/opt/bin:$PATH" > /user/JohnDoe/.bashrc
14) Set
.bashrc ownership to JohnDoe with:
- Code: Select all
chown JohnDoe.root /user/JohnDoe/.bashrc
15) Log out as root.
16) Log in over SSH as JohnDoe and check that
svnserve is in the path (try to execute it).
17) If that works OK, create a test repository under
/volume1/svn with
svnadmin create /volume1/svn/test18) You could try to check it out locally first with:
- Code: Select all
svn co svn+ssh://JohnDoe@localhost/volume1/svn/test /volume1/tmp/test
19) If that works, use the same command (replace localhost with correct IP or DNS name) to checkout from remote.
Please note following differences to accessing with svn:// protocol:
1) the Repository has to be writable to all local Synology users, who need to access the repository, not just the user, under which the svnserve daemon runs (as in this case no svn daemon is necessary. If if is running, it will not be used when accessing with svn+ssh). This might require you to create a special group and assign the group write permissions to the repository contents. Be sure to check the s-bits for the folders in this case!
2) When checking out a repository, you must always provide full path to the repository location, as the relative path in inet.d (with the -r option) is not evaluated with svn+ssh method. You do not need to modify
/etc/inetd.conf or
/etc/services files as discussed in the Step-by-step Subversion tutorial in Wiki which uses inet.d access method. Also no modification should be made under the repositories
conf directory.
I hope, this helps you further.
Cheers,
Risto