Skip to content

[BUG]: conf folder in downloaded repo created as Root instead of normal user #5230

Open
@ocdevo

Description

@ocdevo

What happened?

Some of our pipelines running on self hosted agents developed this problem recently. When setting up for the pipeline stage this error is recevied when checking out the source repo.

Starting: Checkout databases@dev to s

Task : Get sources
Description : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version : 1.0.0
Author : Microsoft
Help : More Information

Syncing repository: databases (Git)
git version
git version 2.43.0
git config --get remote.origin.url
##[warning]'git config --get remote.origin.url' failed with exit code: 1, output: ''
##[error]Access to the path '/home/devin/myagent/_work/1/s/conf/Deploy_Dev' is denied.
Finishing: Checkout databases@dev to s

Looking at the _work/{id}/s/conf Diectory shows that the Conf folder and sub-folders are owned by root instead of the active user.

drwxr-xr-x 2 devin devin 4096 Jun 2 20:03 Tools
-rw-r--r-- 1 devin devin 6530 Jun 2 20:03 azure-pipelines.yml
drwxr-xr-x 3 root root 4096 Jun 2 20:19 conf
-rw-r--r-- 1 devin devin 4072 Jun 2 20:03 createDbPipeline.yml
drwxr-xr-x 4 devin devin 4096 Jun 2 20:03 data

Either changing the owership of the conf folder and sub-folders to the user the agent is running under (In this case devin), or deleteing the work folder entirely will fix the problem for the next task. However the task fowllowing that one usally fails as when the repository is pulled again, the problem repeats.

Seems this is similar to #5172 The path within the _work folder is different.

Versions

OS: ubuntu 24.04
Agent Version: 4.255.0

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

ubuntu 24.04

Version controll system

No response

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions