R – Nant / Cruise Control – Unable to copy file to another server

cruisecontrol.netnantpermissions

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.

Best Answer

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.

Related Topic