← Back to issue list

snapcraft 9.2.1 produces noise: couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)

View original Github issue

Metadata

Project
snapcraft
Number
#6523
Type
issue
State
open
Author
taurus-forever
Labels
—
Created
Updated
Closed
—

Current evaluation

snapcraft 9.2.1 produces python-apt warning noise during package download: 'Download is performed unsandboxed as root as file couldn't be accessed by user _apt'. Regression from 8.x.

Suggested action: keep open

Reason: Valid cosmetic regression reported with clear reproduction steps. The warning originates from python-apt's pkgAcquire::Run when snapcraft downloads packages as root. PR #6525 (merged) updated python-apt wheels which may have introduced this behavior. The warning is harmless noise but should be suppressed or addressed for cleaner output.

Evaluated by: mr-cal-bot

Impact: 20 Quick Win: 8 Complexity: 30 Confidence: 70 Actionability: 60

Issue body

### Check existing issues - [x] I've verified that this bug isn't described by any existing issues. ### Bug description Hi, Issue: ``` > snapcraft pack Pulling postgres-debs :: Downloading package: coreutils/snap/snapcraft/19458/lib/python3.12/site-packages/apt/package.py:810: Warning: W:Download is performed unsandboxed as root as file '/root/.cache/snapcraft/download/coreutils_9.4-3ubuntu6.3_amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied) acq.run() Packed postgresql_16.15_amd64.snap ``` STR: ``` sudo snap install snapcraft # v9.2.1: latest/stable r19387 or latest/edge r19458 git clone https://github.com/canonical/postgresql-snap && cd postgresql-snap snapcraft clean && snapcraft pack # produces noise above ``` The previous version 8.x had no such noise: ``` sudo snap refresh snapcraft --channel 8.x/stable # v8.14.5, r17614 snapcraft clean && snapcraft pack # has no such noise ``` ### Steps to reproduce See above ### Environment > lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 26.04.1 LTS Release: 26.04 Codename: resolute > uname -a Linux corporate 7.0.0-38-generic #38-Ubuntu SMP PREEMPT_DYNAMIC Fri Sep 4 09:10:14 UTC 2026 x86_64 GNU/Linux > snap list snapcraft lxd Name Version Rev Tracking Publisher Notes lxd 5.21.8-3a06799 40958 5.21/stable canonical✓ - snapcraft 8.14.5.post2 18961 8.x/edge canonical✓ classic ### snapcraft.yaml ```yaml https://github.com/canonical/postgresql-snap/blob/16/edge/snap/snapcraft.yaml ``` ### Log output ```shell Pulling postgres-debs :: Downloading package: coreutils/snap/snapcraft/19458/lib/python3.12/site-packages/apt/package.py:810: Warning: W:Download is performed unsandboxed as root as file '/root/.cache/snapcraft/download/coreutils_9.4-3ubuntu6.3_amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied) acq.run() ```

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b
Impact: 20
Quick Win: 8
Complexity: 30
Confidence: 70
Actionability: 60
keep open snapcraft 9.2.1 produces python-apt warning noise during package download: 'Download is performed unsandboxed as root as file couldn't be accessed by user _apt'. Regression from 8.x.

Update history

Date Change
created

Related work

  • Related To: snapcraft#6525 (confidence 80%)

    PR #6525 merged recently to update python-apt wheels, which may have introduced or exposed this warning behavior in 9.2.1

Related issues

Issue Project State Summary Similarity
#1793 snapcraft 9.2.1 produces noise: couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied) craft-parts open python-apt warning noise during package downloads in snapcraft 9.x (regression from 8.x); transferred to craft-parts by maintainer, awaiting triage
95%