Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

File lost IIS_IUSRS permission after a Tortoise SVN operation

I recently switched my development machine from Windows XP to Windows 7 and since that switch, I have a problem with files permissions when I do operations with Tortoise SVN.

Example: I Have two ASP.NET website set on my local IIS. Beta and Devlo. Beta is a check out of the branch I'm working on and Devlo is a check out of the Trunk.
I made some change on the Beta website and Check it in.
Then I made a merge to reintegrate the branch in the truck on the Devlo website, but I got this error when I test it :

Parser Error   
Description: An error occurred during the parsing of a resource required to 
service this request. Please review the following specific parse error details 
and modify your source file appropriately.  

Parser Error Message: Access to the path 'C:\[...]' is denied.

After investigation, I discovered that every file that was modified by the Tortoise SVN merge lost theirs file permission (Read, Read & Execute) for the users IUSE and IIS_IUSRS.

I could manually put them back, but this happen every time I perform an operation of this kind. Is there a way to keep those permissions unchanged by the SVN operation?


Update
Before the Merge, the file was inheriting is permission from the parent folder (has it's supposed to do.)
Before Merge

But not after the merge :

After Merge

The original file (in the beta folder) was inheriting is permission from the parent folder. Why the TortoiseSVN (explicitly?) block permission inheritance?

like image 976
DavRob60 Avatar asked Jan 19 '12 21:01

DavRob60


2 Answers

I had the same issue and fixed it with the help of this SO answer: https://stackoverflow.com/a/8993163/361831

The answer mentions that updated files are copied to a .svn/tmp directory which is located in the top level of your working copy (as of tortoiseSVN 1.7). This top level dir didn't have the IIS permissions so I guess they weren't inheriting during the copy. So I just set the IIS permissions to that top level dir and set to inherit, and that fixed the issue.

like image 199
Zac Avatar answered Oct 16 '22 11:10

Zac


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)

ANSWER: Locate your .svn directory for that project and fix the permissions with permissions needed by your project.

like image 24
Ers Avatar answered Oct 16 '22 11:10

Ers