SubversionException: ("Can't open file 'c:\svn\repos\db\current': Access is denied. ", 720005)
Submitted by ross on Sat, 09/26/2009 - 11:44
I recently encountered the following error, when I tried to browse my local svn repository using ViewVC:
SubversionException: ("Can't open file 'c:\\svn\\repos\\db\\current': Access is denied. ", 720005)
I'm not sure yet, but I think the culprit was committing changes using Cygwin's svn command and the file: protocol. For example:
c:\src> svn co file:///c:/svn/repo/mana c:\src> cd mana c:\src\mana> svn ci -m 'from heaven'To fix it, I ran the following commands:
cacls c:\svn /T /E /G Administrators:F cacls c:\svn /T /E /G SYSTEM:F cacls c:\svn /T /E /G Users:RFor some reason
cacls c:\svn /T /E /G %USERNAME%:Fgave the error:
The data is invalid.To work around this issue, I executed:
cd /D c:\svn for /R %i in (*.*) do cacls %i /T /E /G %USERNAME%:FUsing the svn: or http: protocols probably do not suffer from this issue. I'll have to remember to use them instead, in the future.
UPDATE:
If I run CollabNet's svnadmin under cmd, cacls reports:
C:\svn\src\db BUILTIN\Administrators:(OI)(CI)F
NT AUTHORITY\SYSTEM:(OI)(CI)F
VARUNA\ross:F
CREATOR OWNER:(OI)(CI)(IO)F
BUILTIN\Users:(OI)(CI)R
BUILTIN\Users:(CI)(special access:)
FILE_APPEND_DATA
BUILTIN\Users:(CI)(special access:)
FILE_WRITE_DATA
C:\svn\src\db\txn-current-lock BUILTIN\Administrators:F
NT AUTHORITY\SYSTEM:F
VARUNA\ross:F
BUILTIN\Users:R
If I run CollabNet's svnadmin under Cygwin's bash, cacls reports:
C:\svn\src\db VARUNA\ross:F
CREATOR OWNER:(OI)(CI)(IO)F
VARUNA\None:R
CREATOR GROUP:(OI)(CI)(IO)R
Everyone:(OI)(CI)R
C:\svn\src\db\txn-current-lock VARUNA\ross:F
VARUNA\None:R
Everyone:R
Another weird Windows anomaly. Just another reason to switch to Linux...