command-not-found does not tell users they need to use --class to install classic snaps

Bug #1763507 reported by Steve Langasek
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
command-not-found (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

When looking at the transition from the awscli deb to the aws-cli snap, I noticed that the aws-cli snap is a classic snap.

This means that the command shown in command-not-found output does not actually work:

$ aws

Command 'aws' not found, but can be installed with:

sudo snap install aws-cli
sudo apt install awscli

See 'snap info aws-cli' for additional versions.

$ sudo snap install aws-cli
error: This revision of snap "aws-cli" was published using classic confinement
       and thus may perform arbitrary system changes outside of the security
       sandbox that snaps are usually confined to, which may put your system at
       risk.

       If you understand and want to proceed repeat the command including
       --classic.
$

It is not ideal that cut-and-pasting the shown command returns an error.

I am not sure that it is better to add the '--classic' flag to the commandline, since that also encourages users to cut and paste without necessarily understanding the implications of installing a classic snap.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in command-not-found (Ubuntu):
status: New → Confirmed
Revision history for this message
John Lenton (chipaca) wrote :

As adding --classic has security implications, we want you to think about what it means, and only add it if you're ok with that. Actively discouraging cut-and-paste that'll open security holes.

Changed in command-not-found (Ubuntu):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.