Configuring SVN server in OSX
From MyWiki
(Created page with 'I develop a nanoBSD based appliance and needed to access SVN repository hosted on my Mac from a FreeBSD VM running on the same Mac. Asking almighty Google to find me an appropria…')
Newer edit →
Revision as of 00:13, 19 November 2012
I develop a nanoBSD based appliance and needed to access SVN repository hosted on my Mac from a FreeBSD VM running on the same Mac. Asking almighty Google to find me an appropriate article, I came across this one, which helped a lot.
One of the people commented that he used built-in _svn account to run the server, so I decided to try it.
My repository is sitting somewhere inside my Documents folder, so I thought it may be a problem even after I change ownership of the repository directory. Quick check of group ownership showed that it may be just fine since _svn and my own account belong to the same group - staff. But....
In the FreeBSD VM I created test directory to check out SVN based project to and tried to check it out:
daemon# mkdir svn_test daemon# cd svn_test/ daemon# svn checkout svn://192.168.51.1/mis svn: Malformed network data
Doh! What's wrong?
daemon# telnet 192.168.51.1 3690 Trying 192.168.51.1... Connected to 192.168.51.1. Escape character is '^]'. svnserve: E000013: Can't check path '/Users/alex/Documents/Personal/SVNrepos': Permission denied Connection closed by foreign host.
So, it wasn't as good as I thought it would be. Checked rights on Documents directory and there it was:
alex-markelovs-macbook-2:mis alex$ ls -ld /Users/alex/Documents/ drwx------@ 156 alex staff 5304 10 Nov 15:27 /Users/alex/Documents/
A quick fix:
alex-markelovs-macbook-2:mis alex$ sudo chmod g+x /Users/alex/Documents alex-markelovs-macbook-2:mis alex$ ls -ld /Users/alex/Documents/ drwx--x---@ 156 alex staff 5304 10 Nov 15:27 /Users/alex/Documents/
Back into FreeBSD VM and try again:
daemon# telnet 192.168.51.1 3690 Trying 192.168.51.1... Connected to 192.168.51.1. Escape character is '^]'. ( success ( 2 2 ( ) ( edit-pipeline svndiff1 absent-entries commit-revprops depth log-revprops atomic-revprops partial-replay ) ) )
Works! Now I need to assess, if I want to leave it like that or go 'water tight' and move repositories out of my home directory completely.