Skip to content

[Question]: Running a self-hosted agent with a non-admin account (MacOS) #5145

Open
@lukewis

Description

@lukewis

Describe your question

I'm trying to setup a self-hosted agent on MacOS, but I want the account to have as few permissions as possible

Steps I've taken

  • Created a new user account (devops) sudo sysadminctl -addUser devops -fullName "Azure DevOps
  • Download, unzip the agent, and configure it
curl -L -o myagent.tar.gz https://vstsagentpackage.azureedge.net/agent/4.252.0/vsts-agent-osx-x64-4.252.0.tar.gz
mkdir ~/myagent && cd ~/myagent
tar -xvf ~/myagent.tar.gz
./config.sh
  • I'm able to run the agent interactively (./run.sh)
  • I'm able to "install" the service (./svc.sh install)
  • I'm NOT able to start the service (I receive the following error)
Failed: failed to load /Users/devops/Library/LaunchAgents/vsts.agent.DevOps.DevOps-Mac.DevOps-Mac-mini.plist

I've verified that the devops user has r/w permission on that file

-rw-r--r--  1 devops  staff  994 Mar 12 21:41 /Users/devops/Library/LaunchAgents/vsts.agent.DevOps.DevOps-Mac.DevOps-Mac-mini.plist

I've asked co-pilot and checked the azure agent documentation, but I'm coming up empty. Any other ideas?

Versions

  • Agent Version: vsts-agent-osx-x64-4.252.0
  • OS Version: 15.3.1

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)

Operation system

MacOS 15.3.1

Version controll system

No response

Azure DevOps Server Version (if applicable)

No response

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