Checkin not working when run from NetworkService account
Moderator: SourceGear
Checkin not working when run from NetworkService account
I have a strange problem I'm trying to figure out. I upgraded to 3.1.8 so I have the current latest version on my Vault Server and Vault Client machines.
I wrote a Windows Service for running builds. The Service is set to run as NetworkService account on Windows 2003. In my build script, it uses the Vault command line to perform vault operations.
My build script successfully calls setworkingfolder, checkout, label, and getwithlabel. I specify a username and password on the vault command line, and the file is successfully checked out to that user.
However, when I call the checkin command at the end of the same script, it returns success, but it does not actually check in the file.
I can run the exact same command line when I log in and run it normally and the file checks in successfully. The name of the file it should be checking in is "RetinaAudit.bld". You can see in the log that it shows it is checked out at some point.
I have attached the client vault log.
Thanks,
Mike Ballou
I wrote a Windows Service for running builds. The Service is set to run as NetworkService account on Windows 2003. In my build script, it uses the Vault command line to perform vault operations.
My build script successfully calls setworkingfolder, checkout, label, and getwithlabel. I specify a username and password on the vault command line, and the file is successfully checked out to that user.
However, when I call the checkin command at the end of the same script, it returns success, but it does not actually check in the file.
I can run the exact same command line when I log in and run it normally and the file checks in successfully. The name of the file it should be checking in is "RetinaAudit.bld". You can see in the log that it shows it is checked out at some point.
I have attached the client vault log.
Thanks,
Mike Ballou
Last edited by mballou on Tue Mar 28, 2006 7:23 pm, edited 1 time in total.
I simplified my script to only perform setworkingfolder, checkout, checkin.
Here is the resulting vault log file.
Here is the resulting vault log file.
- Attachments
-
- VaultCLC.txt
- (261.07 KiB) Downloaded 378 times
The only checkin (commit) command in the log shows 0 items to commit. Did you only invoke one commit command while it was logging, and was the only file in the change set supposed to be RetinaAudit.bld?
I would guess this is due to running the CLC as Network Service, which may not have the same permissions to the registry as the manually logged in user, and in fact may not have a Docs & Settings folder in which to place client state and baseline files, which would cause lots of problems.
Try running the script as the manually logged in user instead of Network Service, and we verify whether that is the issue.
I would guess this is due to running the CLC as Network Service, which may not have the same permissions to the registry as the manually logged in user, and in fact may not have a Docs & Settings folder in which to place client state and baseline files, which would cause lots of problems.
Try running the script as the manually logged in user instead of Network Service, and we verify whether that is the issue.
This problem still recurs sometimes. Deleting the SourceGear cache folder clears it up everytime, but still strange that it is occuring.
The cache folder is under AllUsers profile folder.
To answer your question, the script does run correctly with the logged in user.
As the logged in user, I run the Vault UI to check the status of the file being checked out. Maybe the logged in user is creating the cache folder which somehow doesn't give NetworkService account proper permissions.
If I avoid using the Vault UI, and remove the cache, everything seems to work fine.
For now, I'll just avoid using the Vault UI on that machine and keep an eye on the file getting checked in by the build script.
Do you have any other suggestions to help track down why this occurs in the first place?
Thanks
The cache folder is under AllUsers profile folder.
To answer your question, the script does run correctly with the logged in user.
As the logged in user, I run the Vault UI to check the status of the file being checked out. Maybe the logged in user is creating the cache folder which somehow doesn't give NetworkService account proper permissions.
If I avoid using the Vault UI, and remove the cache, everything seems to work fine.
For now, I'll just avoid using the Vault UI on that machine and keep an eye on the file getting checked in by the build script.
Do you have any other suggestions to help track down why this occurs in the first place?
Thanks