Reputation: 1325
I'm getting this error from my svn repo when I try to commit the changes I've made:
[root@puppet:/opt/puppetdb] #svn commit -m "removing everything before the rebuild"
Deleting conf.d
Deleting logback.xml
Deleting puppetdb
Deleting ssl
svn: E000013: Commit failed (details follow):
svn: E000013: Can't open file '/usr/local/svn/repos/puppetdb/db/txn-current-lock': Permission denied
But the permissions on that file look like I should be able to modify it:
-rwxrwxr-x. 1 apache svn 0 Apr 27 02:18 /usr/local/svn/repos/puppetdb/db/txn-current-lock
SELinux has been turned off with no change in result.
I can get the commit to work if I change permissions on that file to be world readable/writable. But there simply has to be a better way! How can I solve this issue?
Thanks,
Upvotes: 5
Views: 15818
Reputation: 224
The service ownership is only half of the picture. In the case of @bluethundr, with the following repo:
-rwxrwxr-x. 1 apache svn 0 Apr 27 02:18 /usr/local/svn/repos/puppetdb/db/txn-current-lock
ensuring that the Apache user has ownership of all of the files and subdirectories under
/usr/local/svn/repos/puppetdb
might be enough. However, if the owner of the Apache dav_svn_module is member of the svn group and the group has recursive write permissions to the repository then this also works.
Upvotes: 3
Reputation: 917
On the SVN server, ensure that the owner and group of the repository (and all subfolders) are properly set.
For example, I created a repo by issuing the following from the SVN server as root:
svnadmin create /path/myrepo
Initially I was getting the "txn-current-lock" error from my SVN client. On the SVN server, I noticed that /path/myrepo and all of its subfolders had owner:group of root:root. To fix this, I issued the following from the SVN server:
chown -R newowner:newgroup
Ensure your newowner and newgroup items match the owner/group information being supplied by the SVN clients.
Important to make it recursive with the -R option. This fixed the "txn-current-lock" error.
Upvotes: 2
Reputation: 30662
It's not you who should be able to have write access to /usr/local/svn/repos/
and all its contents. Its the service which runs Subversion server (i.e. Apache). Make sure that it has all required permissions to the directory with the repositories.
Upvotes: 2