Dan*_*bix 16 software-installation snap visual-studio-code
我尝试使用以下命令在 Ubuntu 16.04 上将 MS Visual Studio Code 作为 snap 安装:
sudo snap install vscode
Run Code Online (Sandbox Code Playgroud)
但我有以下错误:
error: This revision of snap "vscode" was published using classic confinement and thus may perform
arbitrary system changes outside of the security sandbox that snaps are usually confined to,
which put your system at risk.
If you understand and want to proceed repeat the command including --classic.
Run Code Online (Sandbox Code Playgroud)
我想知道--classicflag 有什么作用(不仅仅是man页面解释)以及为什么我在安装 Visual Studio Code 时会收到上一个错误。
小智 13
观看这段简短的视频,其中解释了 snaps 中可用的每个限制模型、--classic存在的原因及其用例。
来源:以下文档来自snapcraft.io:限制政策。
这是应用于快照的默认安全策略。快照仅在其自己的安装空间和选定区域中具有读取和/或写入权限。它可以访问它捆绑和/或由核心或 ubuntu-core snap 提供的库。可以通过接口授予扩展权限,这些接口在安装时或由用户使用snap connect命令连接。例如,家庭接口将授予用户家庭中的读取权限。
严格限制为您提供以下可读和/或可写路径:
有关严格限制的快照可见的更多详细信息,以及在快照的有限空间内访问外壳的方法,请参阅环境变量列表。
开发者模式,也称为 devmode,使用与严格限制相同的安全策略,但安全拒绝在/var/log/syslog(参见调试)中变成了警告。这在捕捉应用程序时很有用,可以发现需要声明哪些接口。开发者模式下的 Snap 无法发布到稳定和候选商店渠道。
经典限制中的快照就像一个传统的打包应用程序,具有对系统的完全访问权限。与严格和开发模式相反,经典 snap 中的“/”是主机系统的“/”,而不是核心 snap 的“/”。使用这种完全开放的安全策略的快照在商店中手动审查,并且只允许在 snapd 安装在传统 Linux 发行版之上的系统上,而不是从Ubuntu Core映像启动系统。它们可以在所有商店渠道中发布。