snap-confine refuses to launch application to avoid permission attack

25,608
sudo apt purge snapd snap-confine && sudo apt install -y snapd

has fixed the problem for me

Share:
25,608

Related videos on Youtube

Simon
Author by

Simon

Updated on September 18, 2022

Comments

  • Simon
    Simon almost 2 years

    I just installed a program with the package manager snap.

    I installed the app with the following:

    sudo snap install cloudcompare

    I logged out and logged back in my machine to refresh the path. The program is still not launching while icons and path exist now. Here is how I launch the program from the terminal:

    cloudcompare.CloudCompare

    which returns:

    snap-confine has elevated permissions and is not confined but should be. Refusing to continue to avoid permission escalation attacks

    Do you have any idea how to prevent this refusing to continue?

    • undsoft
      undsoft over 7 years
      What version of snap packages do you have installed? I have the following and it works. $ snap version snap 2.23 snapd 2.23 series 16 linuxmint 18.1 kernel 4.4.0-53-generic
    • Simon
      Simon over 7 years
      snap --version snap 2.22.7 snapd 2.22.7 series 16 linuxmint 18.1 kernel 4.4.0-53-generic I have reinstalled snapd, and the application cloud compare. I now obtain a different error: cloudcompare.CloudCompare cannot change profile for the next exec call: No such file or directory The application developper are mentioning that it might be related to snap and mint. cloudcompare.org/forum/…
    • undsoft
      undsoft over 7 years
      Like I said, I tested on Mint 18.1, so not sure what is wrong there. This could be a bug in snapd. I'd be inclined to file it at bugs.launchpad.net/ubuntu/+source/snapd/+bugs
    • lofidevops
      lofidevops over 6 years
    • James Bradbury
      James Bradbury almost 6 years
      The exact same thing happens on plain Ubuntu 18.04 - see related question: askubuntu.com/questions/1074114/…
    • Autumn
      Autumn over 5 years
      This error was symptomatic of an apparmor issue for me. askubuntu.com/a/1074243/347835
  • Simon
    Simon about 7 years
    @leaf4good Thanks for the answer. Following your recomendation, I now have installed snap version 2.22.6 and snapd 2.22.6. and cannot even install a version of the desired package as I get this error:
  • Simon
    Simon about 7 years
    <error: cannot perform the following tasks: - Setup snap "core" (1577) security profiles (skipping security profiles setup for snap "cloudcompare" when handling snap "core": no state entry for key) - Setup snap "core" (1577) security profiles (cannot setup apparmor for snap "core": cannot unload apparmor profile "snap.core.hook.configure": cannot unload apparmor profile: exit status 1 apparmor_parser output: Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.) Warning: unable to find a suitable fs in /proc/mounts, is it mounted?>
  • Simon
    Simon about 7 years
    The apparmor package is up to date, so I am quite confused on what is happening. Thanks
  • James Bradbury
    James Bradbury almost 6 years
    Yes, this "fixes" the problem, but in my case I also had to reinstall my application. Surely there's an easier way, or does snap mean we have to reinstall apps every so often?!