Permissions

Issue #56 closed
thane johnson created an issue

The TFS service account we are using keeps getting permission errors ntrying to write to workspace.

I gave it full plan rights - do you know what else it needs.

java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: com.microsoft.tfs.core.clients.versioncontrol.exceptions.ResourceAccessException: TF204017: The operation cannot be completed because the user (svc_tfs_deploy) does not have one or more required permissions (Administer) for workspace Bamboo_TT-DBTEAM-JOB1_c878b2b1_dfbamboopro1;Thane Johnson. at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:132) at com.atlassian.bamboo.executor.RetryingTaskExecutor.runTask(RetryingTaskExecutor.java:88) at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:191) at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:176) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.execute(VcsCheckoutTask.java:172) at com.atlassian.bamboo.task.TaskExecutorImpl$3.call(TaskExecutorImpl.java:288) at com.atlassian.bamboo.task.TaskExecutorImpl$3.call(TaskExecutorImpl.java:284) at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:200) at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:284) at com.atlassian.bamboo.task.TaskExecutorImpl.executePreparationTasks(TaskExecutorImpl.java:81) at com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask.call(PrepareBuildTask.java:74) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:196) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:124) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:115) at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:215) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:114) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:118) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20) at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52) at java.lang.Thread.run(Thread.java:745) Caused by: com.atlassian.bamboo.repository.RepositoryException: com.microsoft.tfs.core.clients.versioncontrol.exceptions.ResourceAccessException: TF204017: The operation cannot be completed because the user (svc_tfs_deploy) does not have one or more required permissions (Administer) for workspace Bamboo_TT-DBTEAM-JOB1_c878b2b1_dfbamboopro1;Thane Johnson. at com.stellarity.bamboo.repository.TfsRepository.retrieveSourceCode(TfsRepository.java:467) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.fillWorkingDirFromVcs(VcsCheckoutTask.java:259) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.access$100(VcsCheckoutTask.java:56) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$2.call(VcsCheckoutTask.java:177) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$2.call(VcsCheckoutTask.java:173) at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:108) ... 21 more Caused by: com.microsoft.tfs.core.clients.versioncontrol.exceptions.ResourceAccessException: TF204017: The operation cannot be completed because the user (svc_tfs_deploy) does not have one or more required permissions (Administer) for workspace Bamboo_TT-DBTEAM-JOB1_c878b2b1_dfbamboopro1;Thane Johnson. at com.microsoft.tfs.core.exceptions.mappers.VersionControlExceptionMapper.mapSoapFault(VersionControlExceptionMapper.java:81) at com.microsoft.tfs.core.exceptions.mappers.VersionControlExceptionMapper.map(VersionControlExceptionMapper.java:34) at com.microsoft.tfs.core.clients.versioncontrol.internal.WebServiceLayer.deleteWorkspace(WebServiceLayer.java:865) at com.microsoft.tfs.core.clients.versioncontrol.VersionControlClient.deleteWorkspace(VersionControlClient.java:2037) at com.stellarity.bamboo.repository.TfsRepository.getWorkspace(TfsRepository.java:713) at com.stellarity.bamboo.repository.TfsRepository.tryToRetrieveSourceCode(TfsRepository.java:859) at com.stellarity.bamboo.repository.TfsRepository.retrieveSourceCode(TfsRepository.java:445) ... 26 more Caused by: com.microsoft.tfs.core.ws.runtime.exceptions.SOAPFault: TF204017: The operation cannot be completed because the user (svc_tfs_deploy) does not have one or more required permissions (Administer) for workspace Bamboo_TT-DBTEAM-JOB1_c878b2b1_dfbamboopro1;Thane Johnson. at com.microsoft.tfs.core.ws.runtime.client.SOAP12Service.examineResponseDOMForFault(SOAP12Service.java:132) at com.microsoft.tfs.core.ws.runtime.client.SOAPService.examineBodyForFault(SOAPService.java:1105) at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequestInternal(SOAPService.java:732) at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequest(SOAPService.java:473) at ms.tfs.versioncontrol.clientservices._03._RepositorySoap12Service.deleteWorkspace(_RepositorySoap12Service.java:717) at com.microsoft.tfs.core.clients.versioncontrol.internal.WebServiceLayer.deleteWorkspace(WebServiceLayer.java:861) ... 30 more

Comments (5)

  1. Sergey Podobry

    Hi Thane,

    As I see you've previously checked out the repository under the different user (Thane Johnson). Now the user svc_tfs_deploy tries to check out to the same directory and it requires to delete the previous workspace (the workspace is bound to the directory). But the user svc_tfs_deploy has no permissions for that because the workspace belongs to another user.

    So you can grant proper permissions (Administer) to svc_tfs_deploy (you can take them back after the workspace will be deleted) or you can remove the workspace manually.

  2. Log in to comment