snap-confine拒绝启动应用程序,以避免权限攻击。

我刚刚使用软件包管理器snap安装了一个程序。
我使用以下命令安装了这个应用:
sudo snap install cloudcompare 为了刷新路径,我退出并重新登录了我的机器。尽管图标和路径已经存在,但该程序仍然无法启动。以下是我如何从终端启动该程序:

cloudcompare.CloudCompare

snap-confine具有提升的权限,但未受限制,应该受到限制。为了避免权限升级攻击,拒绝继续执行。你有什么办法可以防止这种拒绝继续吗?

您安装的 Snap 包版本是什么?我安装了以下版本,并且运行正常。snap 2.23 snapd 2.23 series 16 linuxmint 18.1 kernel 4.4.0-53-generic``` - popey
snap --version snap 2.22.7 snapd 2.22.7 series 16 linuxmint 18.1 kernel 4.4.0-53-generic我已经重新安装了snapd和应用程序cloud compare。现在我遇到了一个不同的错误:cloudcompare.CloudCompare无法更改下一次执行调用的配置文件:没有这个文件或目录。应用程序开发人员提到这可能与snap和mint有关。http://www.cloudcompare.org/forum/viewtopic.php?f=12&t=2333&p=9181&sid=0f0b02e4d94c4c498e0510b1689912a8#p9181 - Simon
就像我说的,我在Mint 18.1上进行了测试,所以不确定出了什么问题。这可能是snapd中的一个错误。我倾向于在https://bugs.launchpad.net/ubuntu/+source/snapd/+bugs上提交错误报告。 - popey
创建了https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1732409 - lofidevops
在纯净的Ubuntu 18.04上发生了完全相同的情况 - 参见相关问题:https://askubuntu.com/questions/1074114/snap-refuses-to-launch-applications - James Bradbury
这个错误对我来说是一个apparmor问题的症状。https://askubuntu.com/a/1074243/347835 - Autumn
1个回答

sudo apt purge snapd snap-confine && sudo apt install -y snapd

解决了我的问题

@leaf4good 感谢你的回答。根据你的建议,我现在已经安装了 snap 版本 2.22.6 和 snapd 版本 2.22.6。但是,我甚至无法安装所需软件包的版本,因为出现了以下错误: - Simon
<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
apparmor软件包已经是最新的,所以我对发生的事情感到非常困惑。谢谢。 - Simon
4是的,这个"修复"了问题,但在我的情况下我还必须重新安装我的应用程序。肯定有更简单的方法吧,难道Snap意味着我们每隔一段时间就要重新安装应用程序吗? - James Bradbury