Permissions problem using snapcraft in Azure Pipelines

Sorry for belated follow-up here – things got busy with the day job :wink:

My own azure pipelines setup is pretty simple:

pr:
- 1.*

jobs:
- job: ldc2_snap
  timeoutInMinutes: 0
  pool:
    vmImage: ubuntu-16.04
  steps:
  - script: |
      set -x
      snap version
      lxd --version
      sudo apt-get update
      sudo snap install --classic --candidate snapcraft
      export PATH="${PATH}:/snap/bin"
      snapcraft --version
      snapcraft
    displayName: Build ldc2 snap package

Note that this assumes that snapd is already installed (which seems reasonable and has always worked before), and it exports an updated PATH that includes /snap/bin (so there should be no difficulty finding the installed snapcraft). The problem in this case really does look like it’s down to permissions.