2

I am trying to import a repository into SVN using:

svn import /home/guest/Desktop/first_repo/ file:///var/www/svn/repos/first_one -m "first repository"

When I fire this command, I get a big list of added files and finally it exits with the error listed below:

svn: Can't move '/var/www/svn/repos/db/txn-protorevs/1-d.rev' to
'/var/www/svn/repos/db/revs/0/2': Permission denied

I changed the permissions of the repos directory and all the files in it to 777. I disabled selinux.

Then, I tried the same as Super User: it has been added and I am also able to checkout. But, when I try to commit with some changes (as a normal user) I get the same error again:

Transmitting file data .svn: Commit failed (details follow):
svn: Can't move '/var/www/svn/repos/db/txn-protorevs/1-e.rev' to
'/var/www/svn/repos/db/revs/0/2': Permission denied

Now I have two questions:

  1. Is svn import a must and should it be done as Super User? If yes, why I am not able to commit as a normal user? (I am giving 777 permissions)
  2. Am I doing anything wrong?

2 Answers 2

2

Finally, i got the answer on my own.
The problem is the files in /var/www/svn/repos/db/transactions and /var/www/svn/repos/db/txn-protorevs don't have access permissions. I gave 777 permissions to these folders, but, i forgot to give permissions to the files inside in those folders.

So, Need to check permissions of all the folders and files correctly. Thank you.

Sign up to request clarification or add additional context in comments.

Comments

1

My scenario was creating a new repo on the server and attempting to import from the client.

I compared all the group and user permissions and file permissions against a working repo on same server. Despite all matching, I received the same "can't write..." error repeatedly.

I decided to check the versions of svn on server and client and found a minor mismatch. The server was running 1.7.9 and the client 1.7.19. I went back and created another repo, but did it with the "--pre-1.6-compatible" flag: "svnadmin --pre-1.6-compatible create repo-new"

All worked fine after that.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.