AnkhSVN breaks ASP.NET sharing permissions with SVN 1.7

╄→гoц情女王★ 提交于 2019-12-01 05:56:52

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.

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)

endin

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.

Matt

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!