Shadow folder doesn't reflect changes to repository files

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

craigr
Posts: 67
Joined: Wed Mar 30, 2011 4:15 pm

Re: Shadow folder doesn't reflect changes to repository file

Post by craigr » Thu Jul 09, 2015 8:26 am

That sounds about right except I wouldn't normally give everyone full access permissions on a web folder. The user account that Vault runs under would have full permission though.

Also there could be files in the folder that are not under control of Vault as of the time that you assign the shadow folder to the project. So the folder contains some files that match Vault exactly and other files that aren't in Vault at all.

However, this sounds better than what we experienced with version 5.

Sorry, by the way, to be so far behind with respect to the version of Vault. Out here in the real world we go with what works and don't change horses three or four times in the middle of the stream. We need a really good reason to update something that's working just fine. In this case, it's the combination of the availability of the Mac client and the fact that verison 5 simply won't run on the new server. :-)

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Re: Shadow folder doesn't reflect changes to repository file

Post by jclausius » Thu Jul 09, 2015 8:48 am

Regarding permissions, I took a short cut and gave everyone full permissions.

In your case, you'll need to make sure the identity the Shadow Folder IIS Application Pool runs under has full control of any folders as Shadow will need those privileges. You may want to try some test runs to make sure you get the permissions set correctly. Also note, Vault 8 is a little more modularized, so there will be multiple IIS Application based on different functional areas of the Vault Server.

A quick warning, when setting up Vault's Shadow Folders, make sure to stay AWAY from the synchronized option when setting up the new shadow. What happens with that setting is that anything encountered on disk and is not found in the repository is deleted. So synchronized means just that... synchronized.
Jeff Clausius
SourceGear

craigr
Posts: 67
Joined: Wed Mar 30, 2011 4:15 pm

Re: Shadow folder doesn't reflect changes to repository file

Post by craigr » Wed Jul 22, 2015 3:55 pm

As I feared, this still isn't working. This is exactly what I experienced with version 5 or 3 or 2 or whatever it was when I first reported this bug.

We moved to a new server. Copied our web folders to the new server directly from the old one.

Copied the Vault 5 database to the new server. Ran version 6.1 server to upgrade the database. Then installed version 8. Everything appears to be working with respect to Vault.

One of the projects in Vault is the website. Set up a shadow folder from the $/Web project to the IIS web folder for the site. Checked out a file, made a change, checked it in. File in shadow folder is not updated.

Tried adding a file to the project, and it shows up in the shadow folder just fine.

Next, I deleted the shadow folder mapping from Vault, made sure all the files in the entire folder tree were NOT read-only, then re-established the shadow folder. No difference. Changes made to files in the project do not get written to shadow folder.

Edit: I'm seeing errors of this type in the shadow folder log: System.UnauthorizedAccessException: Access to the path 'c:\sites\domain_com\web\cart\register.asp' is denied.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Shadow folder doesn't reflect changes to repository file

Post by Beth » Thu Jul 23, 2015 7:57 am

Is the shadow folder on the same machine as Vault or a different machine?

If it's on a different machine, which user is Vault running under? By that, I mean when you installed, in the IIS Process Model did you choose Machine, System, or Custom? If Custom, then did you use a domain user or a local user?
Beth Kieler
SourceGear Technical Support

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Re: Shadow folder doesn't reflect changes to repository file

Post by jclausius » Thu Jul 23, 2015 8:13 am

craigr wrote:As I feared, this still isn't working. This is exactly what I experienced with version 5 or 3 or 2 or whatever it was when I first reported this bug.

Edit: I'm seeing errors of this type in the shadow folder log: System.UnauthorizedAccessException: Access to the path 'c:\sites\domain_com\web\cart\register.asp' is denied.
I cannot comment on the previous problems without knowing the exact error. However, the log entry you posted points to a permissions problem on the files. It appears as if Shadow Folder is trying to make the change. If you made a change to $/web/cart/register.asp, then it appears Shadow Folder process tried to overwrite the file at 'c:\sites\domain_com\web\cart\register.asp'. However, this error has a couple of different sources, but the most common is the current security permissions on the shadowed directory/files on disk disallows writes to the file by the OS.

By default, Vault 8's Shadow Folder will run under the security context of "IIS AppPool\VaultShadowFolderAppPool", so that security context would need FULL permissions on any directories/files you are shadowing. If Vault Shadow Folder is running under a different account (which Beth is asking about), then Vault Shadow Folder is running under a different security context, and that security context would need FULL permissions on the directory/files.

If you can identify the correct security context to assign to the permissions of the files then that hopefully resolves the 'Unauthorized Access' errors.
Jeff Clausius
SourceGear

craigr
Posts: 67
Joined: Wed Mar 30, 2011 4:15 pm

Re: Shadow folder doesn't reflect changes to repository file

Post by craigr » Thu Jul 23, 2015 4:53 pm

I passed this along to my server guy and he was able to change permissions as you describe and it appears to be working now. Thanks for your help

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Re: Shadow folder doesn't reflect changes to repository file

Post by jclausius » Fri Jul 24, 2015 8:10 am

Good to see you resolved the problem.
Jeff Clausius
SourceGear

Post Reply