问题标签 [apparmor]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
7 回答
18039 浏览

docker - How to stop running Container, if error response from daemon is: Cannot Kill Container [...] permission denied?

Tough task: Everytime I try to stop or kill a running container, I get permission denied as an error response from Daemon.

I just started learning how to use docker by using a Ubuntu18.04 VM. I was running a container for the first time. I was not able to stop it but at least it was running. Now, after I tried to run another image "furtuas/daisitory:image_available_first_ms", everything got worse. Two containers are running, I can't stop non of them. I tried to restart docker but the containers are still running with the difference that localhost is not working anymore. Maybe it happened bc I ran on the same host like the one before

I am not familiar with docker, ubuntu, terminal etc. I would appreciate detailed answers for beginners

Please help.

After logout the VM, still the same response:

0 投票
2 回答
2265 浏览

docker - 无法在容器上应用 AppArmor 配置文件:“没有这样的文件或目录”

我正在尝试应用以下简单的 AppArmor 配置文件:

当我运行时,docker run -it --rm --security-opt apparmor=docker-profile alpine我收到以下错误:

docker:来自守护进程的错误响应:无效的标头字段值“oci运行时错误:container_linux.go:247:启动容器进程导致\”process_linux.go:359:容器初始化导致\\“apparmor无法应用配置文件:没有这样的文件或目录\\"\"\n"。

我尝试重新安装它(基于此处的建议):

它没有帮助,我仍然遇到同样的错误。

任何建议可能是什么原因以及如何解决?

0 投票
0 回答
159 浏览

containers - 无法使用 AppArmor 禁用调试文件

我需要在我的特权容器debugfs上使用 AppArmor禁用。 在容器内,任何人都可以运行并查看所有主机文件。 当我搜索如何做到这一点时,我发现这个链接写着我只需要运行:
debugfs /dev/sda1

不幸的是,我仍然可以使用debugfs.
我不想删除debugfs,因为它很容易带来这个文件。
我也试过:

但我仍然能够运行debugfs /dev/sda1

我想用 AppArmor 阻止它,所以我使用了deny mount fstype=debugfsanddeny /sys/kernel/debug/* mrwklx但它没有阻止它。
我的 AppArmor 文件:

0 投票
0 回答
89 浏览

java - 启动时意外的 JVM 崩溃 - 有问题的帧 readdir_r+0x36 - Apparmor 已启用

启用 Apparmor 时:

每当我通过 JVM 参数打开 JFR 后启动 JVM 时,JVM 就会崩溃并出现以下错误。

我的 JFR 设置如下:

当 Apparmor 被禁用 时,JVM 启动时没有任何错误。

我的要求是,我必须为我的应用程序启用 Apparmor。我应该如何摆脱这个错误?

谢谢。

0 投票
1 回答
3424 浏览

mysql - mysql服务在启动时超时

启动mysql超时。我不确定为什么。

我按照建议浏览了日志文件,只是为了得知它已经超时,但不明白为什么。我什至尝试过重新安装灯组,但结果相同。

我尝试粘贴 journalctl -xe 的结果,但无法提交,因为那里有相当多的代码。所以这里是输出

0 投票
1 回答
182 浏览

mysql - Mysql 服务器未在从 AMI 创建的 EC2 实例上运行

我有一个 EC2 实例,其中 Mysql 服务器工作正常。我由此创建了一个 AMI,并从此 AMI 启动了一个新实例。现在 Mysql 服务器根本无法在这个新的 AMI 上启动。

下面是o/p:

我尝试了一切,但无法开始。

我遇到并遵循的最接近的线程没有任何运气:

  1. https://askubuntu.com/questions/916009/mysql-wont-start-because-of-apparmor
  2. https://support.plesk.com/hc/en-us/articles/360004185293-Unable-to-start-MySQL-on-Ubuntu-AVC-apparmor-DENIED-operation-open-

请帮忙,我对此一无所知。

0 投票
0 回答
354 浏览

mysql - 在 Ubuntu 18.04 上更改 Mysql 数据目录的问题

我正在尝试更改 Ubuntu 18.04 上的 Mysql 数据目录。我在这里遵循了确切的说明:https ://www.digitalocean.com/community/tutorials/how-to-move-a-mysql-data-directory-to-a-new-location-on-ubuntu-18 -04

但是当我走到这一步时:

我收到以下错误:

systemctl status apparmor.service 的输出是:

journalctl -xe 的输出是:

请问您有什么建议可以解决这个问题吗?

0 投票
1 回答
973 浏览

linux - LXC 非特权容器内的 Docker

我正在尝试在 LXC 非特权容器中运行 Docker 容器。谁能建议我错过了什么?

如果我从 LXC 容器中删除 apparmor,它可以正常工作。似乎我需要做一些 apparmor 魔法才能在不禁用 apparmor 的情况下使其工作?

这是我当前的 LXC 容器配置:

0 投票
1 回答
1201 浏览

docker - 为什么 docker push 证书文件上的注册表错误?

如此处所述如何在 ubuntu 16.04 上设置 docker 私有注册表

/etc/hosts是这样改的:

然后我拉了注册表图像:

然后我制作了证书文件

我将其复制ca.crt到客户端主机中的这些路径:

然后我在服务器主机上运行容器:

我标记了图像

但是当我想将图像推registry-server:5000/pma-test送到服务器时:

出现以下错误:

来自守护进程的错误响应:打开 /etc/docker/certs.d/registry-server:5000: 权限被拒绝

=======================================

更新:

我跑了journalctl -xe,发现了这些错误:

9 月 30 日 13:58:37 docker.dockerd[926]: time="2019-09-30T13:58:37.229097561Z" level=debug msg="Calling GET /_ping"

9 月 30 日 13:58:37 docker.dockerd[926]: time="2019-09-30T13:58:37.238248010Z" level=debug msg="Calling POST /v1.38/images/registry-server:5000/pma -测试/推送?标签=“

9 月 30 日 13:58:37 docker.dockerd[926]: time="2019-09-30T13:58:37.238670117Z" level=debug msg="hostDir: /etc/docker/certs.d/registry-server:5000 "

9 月 30 日 13:58:37 docker.dockerd[926]: time="2019-09-30T13:58:37.238797277Z" level=debug msg="FIXME: Got an API for which error does not match any expected type!! !: 打开 /etc/docker/certs.d/registry-server:5000: 权限被拒绝" error_type="*os.PathError" module=api

9 月 30 日 13:58:37 docker.dockerd[926]: time="2019-09-30T13:58:37.238831133Z" level=error msg="Handler for POST /v1.38/images/registry-server:5000/ pma-test/push 返回错误:打开 /etc/docker/certs.d/registry-server:5000: 权限被拒绝”

9 月 30 日 13:58:37 docker.dockerd[926]: time="2019-09-30T13:58:37.238861895Z" level=debug msg="FIXME: Got an API for which error does not match any expected type!! !: 打开 /etc/docker/certs.d/registry-server:5000: 权限被拒绝" error_type="*os.PathError" module=api

9 月 30 日 13:58:37 审核 [926]:AVC apparmor="DENIED" operation="open" profile="snap.docker.dockerd" name="/etc/docker/certs.d/registry-server:5000/ " pid=926 comm="dockerd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0

9 月 30 日 13:58:37 内核:审计:type=1400 审计(1569851917.234:53):apparmor="DENIED" operation="open" profile="snap.docker.dockerd" name="/etc/docker/certs. d/registry-server:5000/" pid=926 comm="dockerd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0

为什么会发生这个错误?

Docker 版本 19.03.2,构建 6a30dfc

docker-compose 版本 1.24.0,构建 0aa59064

服务器和客户端主机:Ubuntu 18.04

0 投票
2 回答
9339 浏览

docker - docker:来自守护程序的错误响应:系统上启用了 AppArmor,但无法加载 docker-default 配置文件

我按照官方网站上描述的安装过程在 ubuntu 19.04 上安装了 docker-ce 19.03.3。安装效果很好。但是当我想通过创建一个容器进行测试时,

我有这个错误:

跑步/usr/sbin/apparmor_parser apparmor_parser -Kr /var/lib/docker/tmp/docker-default911109442

输出失败:

`