views:

275

answers:

1

This Nant task (controlled by CruiseControl) is failing to copy files to a share on another server.

<target name="DeployToTargetDirectory" description="Copies files to target deploy folder (this may not be the final virtual directory)">
<if test="${not directory::exists(AppDeploymentFolder)}">
  <fail message="Deployment folder not found: ${AppDeploymentFolder}"/>
</if>

<!--Delete existing files in deployment folder-->
<echo message="Clearing down existing files and folder in deployment folder: ${AppDeploymentFolder}"/>
<delete>
  <fileset basedir="${AppDeploymentFolder}">
    <include name="**/*"/>
  </fileset>
</delete>

<!--Copy all files / folders to the deployment folder-->
<echo message="Copying configured site to: ${AppDeploymentFolder}"/>
<copy todir="${AppDeploymentFolder}">
  <fileset basedir="${StagingFolder}">
    <include name="**/*"/>
  </fileset>
</copy>

I get error:

Failed to create directory 'xxxx'. Access to the path 'xxxx' is denied.

I think its a permissions issue, but I can't tell which account Nant is running under.

Any way I can find this out?

Thanks.

+1  A: 

it's probably not the account that nant is running under but the account that cruisecontrol is running under since it's the one executing that process. So I'd check which account is running cruisecontrol. If it's a system account you may want to have it use a real account and then you can give that account the permissions you need to execute all your tasks.

Joshua Cauble
CruiseControl is running under the NetworkService account.What is confusing me is that this use to work but has just stopped recently. I assumed our network admin's removed a domain account but they say they haven't.
empo
Personally I would convert the service to run under a domain account you control, that way you can resolve issues for permissions very easily. That's what we have done on our build farms. They all run under a domain account that has access to all the necessary pieces/destinations. Just make sure the domain acct has sufficent privelages on the machine that is running cruisecontrol so that it won't have issues there either.
Joshua Cauble