0
votes

I have a bat file in which I perform the copying folder from my computer to a remote computer in a shared folder. If I run it on your computer from the command line, everything works. If I add this bat file TeamCity it gives an error "error in Access." If I instead of the path to the shared folder write path to a folder on my computer, it is normally all copies TeamCity.

so looks bat file when copying to the local computer

cls
SET ARTPATH="C:\myfolder\"
cd %ARTPATH%
xcopy DatabaseUpgrader /e /Y C:\example\
cd c:\

so looks bat file when copying to a remote computer in a shared folder

cls
SET ARTPATH="C:\myfolder\"
SET DBPATH=\\10.73.0.3\DBUpdater\DatabaseUpgrader\
cd %ARTPATH%
xcopy DatabaseUpgrader /e /Y %DBPATH%

folder DBUpdater now shared all network users. I think that launches White TeamCity file under the user has no rights. how to fix it but do not know

2

2 Answers

1
votes

If your build agent is installed as a service, try the following:

  1. Run the service under account that has enough rights for the share, by default it is installed under SYSTEM account that can't go outside of the box.
  2. Change agent installation from service to console app, here's a TeamCity doc saying that you need to do it to access network shares: http://confluence.jetbrains.com/display/TCD8/Known+Issues#KnownIssues-Windowsservicelimitations
0
votes

My knowledge of Windows is very poor, but try to compare the permissions of these two users (the one that you are logged in as, and the second that TC agent is run by).