← Back to issue list

snapcraft --use-lxd should have message about requring sudo

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1865230
Type
issue
State
open
Author
~haydenb
Labels
—
Created
Updated
Closed
—

Current evaluation

LXD setup can leave a non-group user with an inaccessible socket, but the reporter never confirmed lxd-group membership; requiring sudo was rejected.

Suggested action: needs triage

Reason: The report provides concrete socket permission and storage-pool errors, and current docs say the user must join the lxd group, which Snapcraft cannot manage automatically. However, the reporter did not answer the maintainer's request to verify group membership, no root cause was confirmed, and an unconditional sudo check would contradict the maintainer's comment; current-version reproduction and checks in craft-providers are still needed.

Evaluated by: mr-cal-bot

Impact: 38 Quick Win: 6 Complexity: 55 Confidence: 82 Actionability: 35

Issue body

Running $ snapcraft --use-lxd will set up LXD but it will not connect: hayden@ubuntu:~/ghost-desktop$ snapcraft --use-lxd Support for 'LXD' needs to be set up. Would you like to do that it now? [y/N]: y snapd is not logged in, snap install commands will use sudo lxd 3.21 from Canonical✓ installed Error: LXD still not running after 30s timeout (Get http://unix.socket/1.0: dial unix /var/snap/lxd/common/lxd/unix.socket: connect: permission denied) Timeout reached waiting for LXD to start. Then, naturally, you try $ sudo snapcraft --use-lxd but get this: hayden@ubuntu:~/ghost-desktop$ sudo snapcraft --use-lxd The LXD provider is offered as a technology preview for early adopters. The command line interface, container names or lifecycle handling may change in upcoming releases. Launching a container. An error occurred with the instance when trying to launch with 'LXD': No storage pool found. Please create a new storage pool. Ensure that 'LXD' is setup correctly and try again. The fix is to $ snap remove lxd --purge and then $ sudo snapcraft --use-lxd. Because using snapcraft --use-lxd without sudo leaves it in an unusable state, perhaps it should fail and exit if --use-lxd is enabled without sudo.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 38
Quick Win: 6
Complexity: 55
Confidence: 82
Actionability: 35
needs triage LXD setup can leave a non-group user with an inaccessible socket, but the reporter never confirmed lxd-group membership; requiring sudo was rejected.
stealth/space-bunny-alpha
Impact: 42
Quick Win: 13
Complexity: 43
Confidence: 78
Actionability: 54
keep open LXD auto-setup can time out with socket permission denied for non-root users; maintainer rejected a sudo requirement and requested lxd group verification, which remains unanswered.
stealth/space-bunny-alpha
Impact: 38
Quick Win: 18
Complexity: 46
Confidence: 79
Actionability: 87
needs triage Unprivileged --use-lxd leaves LXD unusable after a permission-denied socket error, requiring a purge and privileged retry; remains open without maintainer triage.
qwen/qwen3.8-27b
Impact: 25
Quick Win: 18
Staleness: 95
Complexity: 30
Confidence: 65
Support Request: 15
close stale snapcraft 3.x --use-lxd (LXD provider, a technology preview) left LXD in a broken state when run without sudo; reporter suggests failing early. 6.5 years old, zero comments, no labels or maintainer interaction; LXD preview since superseded by Multipass.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 15
Confidence: 85
Support Request: 40
close stale Suggests snapcraft should warn or fail when --use-lxd is run without sudo, as it currently leaves LXD in a broken state. Untriaged, no maintainer response, inactive for over 6 years.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 15
Confidence: 85
Support Request: 20
close stale Running snapcraft --use-lxd without sudo causes permission errors and leaves LXD unusable. Author requests a clear error message requiring sudo. Issue is unlabelled and has seen no maintainer activity in over six years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 15
Confidence: 85
Support Request: 10
close stale Feature request to add a clear error message when running snapcraft --use-lxd without sudo, as the current behavior causes confusing permission and storage errors. Untriaged and inactive for over 6 years.

Update history

Date Change
created

Related work

  • Related To: snapcraft#4443 (confidence 58%)

    A later LXD timeout issue reports an improved timeout, but the available summary does not establish that it fixes this socket-permission or setup-state problem.

Related issues

No related issues found above the similarity threshold.