【问题标题】:Rootless Podman Containers: and setting secure permissions/SELinux on attached storageRootless Podman Containers:并在附加存储上设置安全权限/SELinux
【发布时间】:2021-06-02 23:28:37
【问题描述】:

我正在阅读与此相关的相互矛盾的信息,并希望得到澄清。

问题/疑问 附加目录作为容器存储的安全权限设置是什么

我认为以下是最安全的。没有/

#While as user_1 for example
sudo mkdir /containers/web_server1;
sudo chown user_1:user_1 /containers/web_server1;
sudo chmod 750 /containers/web_server1;

Then set semanage fcontext to container_file_t  for /containers/web_server1

为什么我在书籍和在线教程中看到将权限设置为 777 或 757。我在这里误解了什么?

谢谢

【问题讨论】:

    标签: linux containers storage selinux podman


    【解决方案1】:

    您现在可以从 2022 年 2 月开始试用 podman 4.0.0(和 latest releases,如 4.0.2)。

    12173 "podman pod create needs to support --security-opt" 的问题已通过PR 12208 解决

    Pod 安全选项支持和 Infra Inheritance 更改

    添加了对 pod 安全选项的支持。

    这些应用于基础设施并在添加时向下传递给容器(除非被覆盖)。

    security options 包括:

    • apparmor=unconfined : 关闭 pod 的 apparmor 限制
    • apparmor=your-profile : 为 pod 设置 apparmor confinement profile
    • seccomp=unconfined : 关闭 Pod 的 seccomp 限制
    • seccomp=profile.json:列入白名单的系统调用 seccomp Json 文件用作 seccomp 过滤器

    【讨论】:

      猜你喜欢
      • 2021-05-31
      • 2014-10-02
      • 2023-02-04
      • 1970-01-01
      • 2015-01-30
      • 2012-03-08
      • 1970-01-01
      • 1970-01-01
      • 2021-04-07
      相关资源
      最近更新 更多