Subversion installation

I'm having problems getting the hang of subversion...

I have read the Subversion book as well as a guide on this forum Thread 6888/, but I'm making basic mistakes in setting this up, although I think I have Apache configured correctly... Here's what I'm doing:-
Code:
mkdir /var/svn
chown -R svn:svn /var/svn
svnadmin create /var/svn/myproj
svn import myfiles http://127.0.0.1/svn/myproj -m "My Proj"
svn: E000013: Can't open file '/var/svn/myproj/db/txn-current-lock': Permission denied

What have I overlooked?
 
You should probably read /var/log/httpd-error.log.
It's the same as above
Code:
Can't open file '/var/svn/myproj/db/txn-current-lock': Permission denied
I'm not sure how to give Apache permission to access the /var/svn directory.
 
Apache usually runs on the www account, make sure that user has, at least, read access. And the www user probably needs write access to certain directories too.
 
Should I add svn to the www group?

Looking at httpd.conf I see User and Group set to www, but /var/log/httpd-error.log is owned by root so how does Apache write to it?
 
Looking at httpd.conf I see User and Group set to www, but /var/log/httpd-error.log is owned by root so how does Apache write to it?
Privileges are dropped after the port and log files have been opened. Only root is able to open ports below 1024 too.

Should I add svn to the www group?
No, you need to chmod(1)/chown(8) the directories so the www user account has read and write access to those files.
 
Back
Top