SVN - Not able to commit files (Can't create directory - no such file or directory)

Sandeepan Nath picture Sandeepan Nath · Jul 26, 2010 · Viewed 7.6k times · Source

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

Answer

Greg Hewgill picture Greg Hewgill · Jul 26, 2010

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.