我注意到,如果我打开 Discord 应用程序,我的 /var/log/syslog 文件每秒都会不断被这些错误填满。这种情况会一直持续到我退出 Discord。然后停止。从这些消息中我所能理解的是,它们与 Discord 应用程序有关。
root@muyustan-ubuntu:/var/log# tail syslog
May 28 03:46:24 muyustan-ubuntu kernel: [126189.613514] audit: type=1400 audit(1590626784.957:124600): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=125686 comm="Discord" requested_mask="read" denied_mask="read" peer="unconfined"
May 28 03:46:24 muyustan-ubuntu kernel: [126189.613537] audit: type=1400 audit(1590626784.957:124601): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=125686 comm="Discord" requested_mask="read" denied_mask="read" peer="unconfined"
May 28 03:46:24 muyustan-ubuntu kernel: [126189.613642] audit: type=1400 audit(1590626784.957:124602): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=125686 comm="Discord" requested_mask="read" denied_mask="read" peer="unconfined"
May 28 03:46:24 muyustan-ubuntu kernel: [126189.613705] audit: type=1400 audit(1590626784.957:124603): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=125686 comm="Discord" requested_mask="read" denied_mask="read" peer="unconfined"
May 28 03:46:24 muyustan-ubuntu kernel: [126189.613755] audit: type=1400 audit(1590626784.957:124604): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=125686 comm="Discord" requested_mask="read" denied_mask="read" peer="unconfined"
May 28 03:46:24 muyustan-ubuntu kernel: [126189.613810] audit: type=1400 audit(1590626784.957:124605): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=125686 comm="Discord" requested_mask="read" denied_mask="read" peer="unconfined"
May 28 03:46:24 muyustan-ubuntu kernel: [126189.613868] audit: type=1400 audit(1590626784.957:124606): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=125686 comm="Discord" requested_mask="read" denied_mask="read" peer="unconfined"
May 28 03:46:24 muyustan-ubuntu kernel: [126189.613935] audit: type=1400 audit(1590626784.957:124607): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=125686 comm="Discord" requested_mask="read" denied_mask="read" peer="unconfined"
May 28 03:46:24 muyustan-ubuntu kernel: [126189.614024] audit: type=1400 audit(1590626784.957:124608): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=125686 comm="Discord" requested_mask="read" denied_mask="read" peer="unconfined"
May 28 03:46:24 muyustan-ubuntu kernel: [126189.614092] audit: type=1400 audit(1590626784.957:124609): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=125686 comm="Discord" requested_mask="read" denied_mask="read" peer="unconfined"
root@muyustan-ubuntu:/var/log# tail syslog
May 28 03:46:29 muyustan-ubuntu kernel: [126194.618007] audit: type=1400 audit(1590626789.961:124719): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=125686 comm="Discord" requested_mask="read" denied_mask="read" peer="unconfined"
May 28 03:46:29 muyustan-ubuntu kernel: [126194.618058] audit: type=1400 audit(1590626789.965:124720): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=125686 comm="Discord" requested_mask="read" denied_mask="read" peer="unconfined"
May 28 03:46:29 muyustan-ubuntu kernel: [126194.618125] audit: type=1400 audit(1590626789.965:124721): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=125686 comm="Discord" requested_mask="read" denied_mask="read" peer="unconfined"
May 28 03:46:29 muyustan-ubuntu kernel: [126194.618188] audit: type=1400 audit(1590626789.965:124722): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=125686 comm="Discord" requested_mask="read" denied_mask="read" peer="unconfined"
May 28 03:46:29 muyustan-ubuntu kernel: [126194.618669] audit: type=1400 audit(1590626789.965:124723): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=125686 comm="Discord" requested_mask="read" denied_mask="read" peer="unconfined"
May 28 03:46:29 muyustan-ubuntu kernel: [126194.618783] audit: type=1400 audit(1590626789.965:124724): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=125686 comm="Discord" requested_mask="read" denied_mask="read" peer="unconfined"
May 28 03:46:29 muyustan-ubuntu kernel: [126194.618998] audit: type=1400 audit(1590626789.965:124725): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=125686 comm="Discord" requested_mask="read" denied_mask="read" peer="/usr/bin/evince"
May 28 03:46:29 muyustan-ubuntu kernel: [126194.619059] audit: type=1400 audit(1590626789.965:124726): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=125686 comm="Discord" requested_mask="read" denied_mask="read" peer="unconfined"
May 28 03:46:29 muyustan-ubuntu kernel: [126194.619190] audit: type=1400 audit(1590626789.965:124727): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=125686 comm="Discord" requested_mask="read" denied_mask="read" peer="unconfined"
May 28 03:46:29 muyustan-ubuntu kernel: [126194.619807] audit: type=1400 audit(1590626789.965:124728): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=125686 comm="Discord" requested_mask="read" denied_mask="read" peer="unconfined"
root@muyustan-ubuntu:/var/log# tail syslog
May 28 03:46:29 muyustan-ubuntu kernel: [126194.618669] audit: type=1400 audit(1590626789.965:124723): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=125686 comm="Discord" requested_mask="read" denied_mask="read" peer="unconfined"
May 28 03:46:29 muyustan-ubuntu kernel: [126194.618783] audit: type=1400 audit(1590626789.965:124724): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=125686 comm="Discord" requested_mask="read" denied_mask="read" peer="unconfined"
May 28 03:46:29 muyustan-ubuntu kernel: [126194.618998] audit: type=1400 audit(1590626789.965:124725): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=125686 comm="Discord" requested_mask="read" denied_mask="read" peer="/usr/bin/evince"
May 28 03:46:29 muyustan-ubuntu kernel: [126194.619059] audit: type=1400 audit(1590626789.965:124726): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=125686 comm="Discord" requested_mask="read" denied_mask="read" peer="unconfined"
May 28 03:46:29 muyustan-ubuntu kernel: [126194.619190] audit: type=1400 audit(1590626789.965:124727): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=125686 comm="Discord" requested_mask="read" denied_mask="read" peer="unconfined"
May 28 03:46:29 muyustan-ubuntu kernel: [126194.619807] audit: type=1400 audit(1590626789.965:124728): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=125686 comm="Discord" requested_mask="read" denied_mask="read" peer="unconfined"
May 28 03:46:34 muyustan-ubuntu kernel: [126199.622860] kauditd_printk_skb: 85 callbacks suppressed
May 28 03:46:34 muyustan-ubuntu kernel: [126199.622864] audit: type=1400 audit(1590626794.968:124814): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=125686 comm="Discord" requested_mask="read" denied_mask="read" peer="unconfined"
May 28 03:46:34 muyustan-ubuntu kernel: [126199.622918] audit: type=1400 audit(1590626794.968:124815): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=125686 comm="Discord" requested_mask="read" denied_mask="read" peer="unconfined"
May 28 03:46:39 muyustan-ubuntu systemd[1985]: gnome-launched-discord_discord.desktop-125532.scope: Succeeded.
注意最后一行,我退出 discord 后,它不再推送错误。那么,你知道这是什么以及如何解决吗?
谢谢。
答案1
我在 18.04 中从 discord 收到的系统日志错误消息略有不同,但我怀疑原因可能是相同的。:
apparmor="DENIED" operation="open" profile="snap.discord.discord" name="/proc/2613/cmdline" pid=4255 comm="Discord" requested_mask="r" denied_mask="r" fsuid=1000 ouid=
我的错误似乎是由 discord 尝试检测我当前正在玩的游戏,以便它可以自动更新我的 discord 状态消息而导致的。您可以通过以下方式关闭此功能:
- 打开 Discord
- 点击用户设置在我的版本中,这是 discord 屏幕左下角的一个齿轮,上面有我的个人资料图片。
信用:皮亚克
如果关闭将当前正在运行的游戏显示为状态消息不起作用。那么你有三个选择:
- 给予 discord 所寻求的许可并承担隐私/安全风险:
- 打开终端
- 类型
snap connect discord:system-observe
- 更多信息,请参阅snapcraft-discord
- 修改 discord AppArmor 配置文件以抑制错误消息并承担兼容性/功能风险:
- 打开终端
gedit admin:///var/lib/snapd/apparmor/profiles/snap.discord.discord
- 通过在文件底部的
}
deny /proc/@{pid}/cmdline r,
deny ptrace (read),
- 保存并关闭 gedit
- 通过输入以下命令加载新的 AppArmor 配置文件
sudo apparmor_parser -r /var/lib/snapd/apparmor/profiles/snap.discord.discord
- 信用 xNinjaKittyx
- 安装 discord 的 apt 版本
- 删除 snap discord -
sudo snap remove discord
- 下载并安装最新的 discord deb 包
- 删除 snap discord -