Search code examples
.netpermissionscruisecontrol.netnantfile-permissions

System.UnauthorizedAccessException using NAnt with CCNet


I'm trying to copy file to network path like '\\serverA\destenation\file', but fail with Unauthorized Access exception. I have tried change ccnet service LogOn account, but without results. If I run this Task from console, it does executes.

Any advise would be appreciate. Thanks


Solution

  • If the ccnet service is running as Local System account, it won't have any network permissions. Trying configuring the service to run as your account. If that succeeds, you should then create, or find, a user that both has the appropriate rights to access the network resource and adheres to the principle of least privilege