AnkhSVN breaks ASP.NET sharing permissions with SVN 1.7

后端 未结 4 1223
無奈伤痛
無奈伤痛 2020-12-19 05:41

The Background (skip to the bottom if you want the question)

Recently I upgraded an SVN repository (hosted on assembla) to SVN 1.7. After doing so,

相关标签:
4条回答
  • 2020-12-19 06:13

    When subversion updates a file it first creates a temporary version in .svn/tmp/. It then moves the file into the right location. (This to avoid corruptions)

    In 1.6 it did this for every directory by itself, but in 1.7 there is just a .svn in the top level directory of your working copy.

    If somehow the filesystem permissions of this .svn directory are restricted, it is possible that the restrictions are copied with the file when it is moved in place. (Subversion doesn't change the permissions itself on Windows)

    0 讨论(0)
  • 2020-12-19 06:16

    I found this exact same issue happened when I did a 'Revert' using:

    • Tortoise Svn 1.6.16
    • AnkhSVN 2.3.11269.1348.
    • Visual Studio 2010 Professional
    • Windows 7 - 64 bit.

    I was completely puzzled the first time I encountered the permissions error and started off by thinking it was my code. After a while of fiddling about I ended up deleting the whole project and re-downloading from Subversion which fixed the issue.

    When this problem happened again I looked more closely at the reverted file, and I found the permissions on the reverted files do not match the permissions of the other files. Specifically 'Users' permissions, for the machine that Visual Studio is running on, is missing altogether.

    So I just added it in by:

    • Right clicking on the problem file. This caused the file properties window to appear.
    • Then clicked on 'Edit...'. The permission window appears.
    • Then clicked on Add and the 'Select Users, Computers, Service Accounts, or Groups window appears.
    • Click on the Object Types button and check all the boxes.
    • Click on the Locations button and make sure your machine name is selected.
    • Type in 'users' then click the 'check names' button.
    • Click OK on all the windows to close them.

    Your website should now run without the permissions error.

    0 讨论(0)
  • 2020-12-19 06:18

    Much information is located in .svn folders inside directory where project was checked out. So in my opinion better use SVN separately from advanced integration tools. Also this deals with solving problem like this.

    0 讨论(0)
  • 2020-12-19 06:23

    I solved this by accessing the security settings for the website folder and and clicking Advanced and then Change Permissions for the IIS_IUSRS user. I checked the "Replace all child object permissions with inheritable permissions from this object" and clicked apply.

    Before that, I had given the IIS user full permissions to the hidden tmp folder in the root of the checkout, but I don't know if this helps with anything.

    I'm not sure if this is a permanent fix, but in case it is not, you can at least use it to reapply permissions for all the files in a single operation.

    0 讨论(0)
提交回复
热议问题