3
votes

I would like to backup my code and be able to access it from desktop or laptop or any other device at any time. So I decided to add a post commit hook to make a simple dump of my repository into a directory, which is synced between all my devices.

I did some testing and pretty much in each scenario I try to run a simple

svnadmin dump c:\path\to\repo > c:\path\to\bkp

results in Access is Denied. The only way I was able to create a dump was to open a command prompt by right clicking and running it as administrator and then issuing the dump command.

Obviously the standard account I use (CallMeBob) is in Administrators group. I also tried adding myself to all VisualSVN groups that were created by VisualSVN (and re-login)), but no joy.

Additionally I tried running things like:

runas /user:administrator svnadmin dump...

which - after asking for administrator password - results in 'Access is Denied' as well. (But i.e.: runas /user:administrator cmd works fine.)

I also tried setting svnadmin.exe to run as administrator, but again, no joy.

Security permissions on the repository folder are as follows:

  • Administrator: Full Control
  • CallMeBob: Full Control
  • System: Full Control
  • Network Service (which is the account running VSVN server): everything ticked apart from Full Control
  • VisualSVN Server Admins: everything ticked apart from Full Control

Clearly there is some sort of permission problem somewhere, but after spending some sick amount of time on this I still don't understand where... any ideas?

EDIT(s):

List of additional checks (as per comments):

  • disabling UAC on CallMeBob account
  • adding Network Service user to VisualSVN groups (which are: VisualSVN Replication Partners, VisualSVN Repository Supervisors, VisualSVN Server Admins)
2
Could you try turning off UAC temporarily and retrying?zedfoxus
Not at my desk, but I believe you'll need to add the Network Service user to VisualSVN with at least read access. I'll check shortly.John Kuhns
@zedfoxus: I did try that as well (just forgot to mention). But just to double check I just disabled it on my account (CallMeBob), re-logged in and still no joy.callmebob
@JohnKuhns: Just added Network Service to all three groups for SVN (which are: VisualSVN Replication Partners, VisualSVN Repository Supervisors, VisualSVN Server Admins), no change.callmebob
Okay, just checked it out. I actually added a local user in the administrator group and set the VisualSVN service to run under that account. I have VisualSVN set to use Windows authentication. I further supplied the username and password for that account in my script when calling svn within the script itself.John Kuhns

2 Answers

3
votes

I was facing the same issue and found this question which has not been answered yet.

Your command is missing the name of the dump file! Add any name for the dump file and it will work like a charm.

svnadmin dump c:\path\to\repo > c:\path\to\bkp\backup.svndump

0
votes

I had this same problem and got it to work by navigating to the directory I wanted to save the backup to from the command window and then just entering a filename with no path.

svnadmin dump C:\path\to\repo > backup.svndump