views:

227

answers:

3

I wanted to move our existing repository (from location A) to a new linux server (location B). So, I created a new repository in that server (location B) with the command:-

svnadmin create --fs-type fsfs <repository_name>

Then I copied the db folder from location A and overwrote that of location B, because I want to keep the previous revisions. I created a system user in location B using the command:-

useradd sandeepan
passwd sandeepan

I did not specify any permissions for the user on the repository.

After that I took checkout from URL svn+ssh://<IP>/<path to repository> and it worked successfully. I am able to update to previous revisions but not able to commit. It says -

Commit failed - Can't create directory 'path/to/repository/db/transactions/1852-1.txn' no such file or directory

So, I tried to provide access to the repository for that user like this:-

groupadd svn_users
usermod -a -G svn_users harry
chgrp -R svn_users /var/backup/hello

But still getting the same error. I am using Smart SVN 5.0.4

Thanks,

Sandeepan

Update

Even after following Greg's recommendation, I am not able to commit. The error now says Permission denied:-

Commit failed - Can't create directory 'path/to/repository/db/transactions/1855-1.txn': 
Permission denied
+3  A: 

When moving a Subversion repository from one machine to another, I would strongly recommend that you use svnadmin dump and svnadmin load to copy the repository. There are subtle differences between minor versions of Subversion that make copying the repository database problematic.

Greg Hewgill
Ok I did'nt know that. Thank you. But, even after doing that I am not able to commit. The error now says `Permission denied`:-`Commit failed - Can't create directory 'path/to/repository/db/transactions/1855-1.txn': Permission denied`
sandeepan
A: 

I did a similar move, and have a similar problem. The transactions directory in db did not exist, or I did not copy it. My fix was to manually create the db/transaction directory. I can now commit.

A: 

It was because chmod was not done!!

I did chmod -R 770 and it solved the problem.

sandeepan
this was the reason why the error was happening... so why am I getting negative votes??
sandeepan