我有一个自定义的AppArmor配置文件来限制同步。(我意识到这可能不是一个具体的Ubuntu问题,但我只使用Ubuntu,所以我还没有看到这是否影响到其他Linux发行版)。
以下是简介:
#include <tunables/global>
/usr/bin/syncthing {
#include <abstractions/base>
# Obviously needs Internet access to work.
network raw,
network inet,
network inet6,
# Access to execute binary
/usr/bin/syncthing cx,
# Wants read access to SOMAXCONN
/proc/sys/net/core/somaxconn r,
# Needs to be able to read these to work properly
/run/resolvconf/resolv.conf r,
/etc/hosts r,
/etc/host.conf r,
/etc/nsswitch.conf r,
/etc/ssl/certs/** r,
/etc/mime.types r,
/etc/gai.conf r,
# Allow access to synced folders.
owner @{HOME}/Documents/ rw,
owner @{HOME}/Documents/** rwk,
owner @{HOME}/Pictures/ rw,
owner @{HOME}/Pictures/** rwk,
owner @{HOME}/Public/ rw,
owner @{HOME}/Public/** rwk,
owner @{HOME}/Music/ rw,
owner @{HOME}/Music/** rwk,
owner @{HOME}/Downloads/ rw,
owner @{HOME}/Downloads/** rwk,
owner @{HOME}/.keys/ rw,
owner @{HOME}/.keys/** rwk,
# Allow access to config files
owner @{HOME}/.config/syncthing/ rw,
owner @{HOME}/.config/syncthing/** rwk,
# Silence warnings on things we don't want access to
deny / r,
deny /* r,
deny @{HOME} r,
}这是我最近收到的syslog信息:
Apr 16 11:07:05 supercomputer kernel: [ 1240.879568] audit: type=1400 audit(1460768825.434:31): apparmor="DENIED" operation="open" profile="/usr/bin/syncthing" name=2F686F6D652F7365616E2F566964656F732F43616D65726120566964656F732F pid=2277 comm="syncthing" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Apr 16 11:16:28 supercomputer kernel: [ 1803.632950] audit: type=1400 audit(1460769388.508:32): apparmor="DENIED" operation="open" profile="/usr/bin/syncthing" name=2F686F6D652F7365616E2F566964656F732F43616D65726120566964656F732F pid=2266 comm="syncthing" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Apr 16 11:26:13 supercomputer kernel: [ 2388.037482] audit: type=1400 audit(1460769973.246:33): apparmor="DENIED" operation="open" profile="/usr/bin/syncthing" name=2F686F6D652F7365616E2F566964656F732F43616D65726120566964656F732F pid=1021 comm="syncthing" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Apr 16 11:36:56 supercomputer kernel: [ 3031.177125] audit: type=1400 audit(1460770616.751:34): apparmor="DENIED" operation="open" profile="/usr/bin/syncthing" name=2F686F6D652F7365616E2F566964656F732F43616D65726120566964656F732F pid=2273 comm="syncthing" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000自从我自己做了配置文件之后,我对AppArmor及其生成的日志变得相对熟悉了--但我以前从未见过这条name=2F686F6D652F7365616E2F566964656F732F43616D65726120566964656F732F消息。它看起来并不是一个文件文件,这正是AppArmor通常报告的内容。
这个错误信息意味着什么?我如何允许它或否认它在个人资料?
发布于 2016-05-04 07:32:51
"name=“后面的十六进制字符串只是您要查找的文件路径的十六进制编码字符串。如果您将十六进制字符串复制到“十六进制”框(或许多等效站点)中的http://www.asciitohex.com/中,然后单击“转换”以获取原始字符串。我不会把确切的字符串放在这里来保护你的隐私--以防万一。
如果不想使用第三方网站,可以运行python shell并执行以下操作:
x="2F.... (your string here)"
''.join(chr(int(x[i:i+2], 16)) for i in range(0, len(x), 2))我在Debian身上也遇到过这个。我不知道为什么会这样。
https://askubuntu.com/questions/757888
复制相似问题