Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,364,119
Community Members
 
Community Events
168
Community Groups

Robocopy problems

I am attempting to copy files from the build directory to another server, using Robocopy.

When Bamboo launches the Robocopy command, I am getting an Access Denied error on the destination path.

When I copy/paste the Robocopy command from the log file into the Powershell, it works fine.....therefore there does not appear to be any permissions/security issues between the two boxes.

I only have an Administrator account doing everything, so it does not look like Bamboo can be launching the Robocopy command via a different account.

Any ideas why I get Access Denied through Bamboo, but can run the Robocopy command just fine from the command line?  This is maddening...

Please help!  Thank you!

 

1 answer

0 votes
Jimmy Seddon Community Leader May 02, 2020

Hi @Jerry Moseley,

First, quick question, is this being from from a local or remote agent?  I ask because that is important as to which user is running the command.  Also, as you are mentioning Robocopy I'm going to assume this is likely two Windows boxes, but could you please confirm that?

Here's what I know from my own experience, if you are running this from a remote agent it doesn't matter what user account the remote agent service is running, the remote agent will run tasks as the user 'bamboo'.  To get around this I wrote a PowerShell wrapper where I would pass in the credentials of the admin user account I wanted it to run as and spawned a new Powershell session as that admin user before running the robocopy command.

If this is running from a local agent check to make sure the Bamboo Server service is running as the Admin user account (or another admin user with proper permissions on the destination box) as tasks will run as the logon user for the service.

I hope that helps!

-Jimmy

Hi Jimmy,

Thank you for your help with this! It was set as run from the default local account (which is administrator), but I changed it to explicitly run as administrator and now it seems to be working! Thanks for your help!

-Jerry

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events