When building an artifact using Azure DevOps, "Publish artifact" task failed with error
Publishing build artifacts failed with an error: EPERM: operation not permitted
When building an artifact using Azure DevOps, "Publish artifact" task failed with error
Publishing build artifacts failed with an error: EPERM: operation not permitted
When you are using A file server option as an Artifact publish location for Publish task, make sure the Agent/Service has access to the server.
In my case, I added the agent in Administrator group to be able to do WRITE operation.
If you use self-hosted agent, by default it runs as local NETWORK SERVICE account that doesn't have access to remote shares. So you should either: