snap在debian11下好像出啥问题了:cannot change profile for the next exec call: No such file or directory

内核是kernel5.10,使用snap安装的certbot会提示:

cannot change profile for the next exec call: No such file or directory

检查了链接都没问题,目测可能是兼容性问题,已经把脚本换到用pip安装了。

解决办法:

apparmor_parser --add /var/lib/snapd/apparmor/profiles/snap.certbot.*

CertBot运行语句改写为:

snap refresh core && apparmor_parser --add /var/lib/snapd/apparmor/profiles/snap.certbot.* && certbot --nginx --no-redirect --register-unsafely-without-email

论坛的脚本跟我那一样,ssl续签不知道会不会出问题。

不过目测2016懒得升级debian11……[em_24]

想了想还是修一下吧,运行一下诊断模式:

SNAP_CONFINE_DEBUG=1 snap run certbot

DEBUG: umask reset, old umask was  022
DEBUG: security tag: snap.certbot.certbot
DEBUG: executable:   /snap/core/11606/usr/lib/snapd/snap-exec
DEBUG: confinement:  classic
DEBUG: base snap:    core20
DEBUG: ruid: 0, euid: 0, suid: 0
DEBUG: rgid: 0, egid: 0, sgid: 0
DEBUG: apparmor label on snap-confine is: unconfined
DEBUG: apparmor mode is: (null)
DEBUG: preparing classic execution environment
DEBUG: set_effective_identity uid:0 (change: yes), gid:0 (change: yes)
DEBUG: creating user data directory: /root/snap/certbot/1434
DEBUG: requesting changing of apparmor profile on next exec to snap.certbot.certbot
cannot change profile for the next exec call: No such file or directory

我感觉是snap的certbot模块出BUG了,最后一行明显出现了一个调用名称重复

snap.certbot.certbot 应该是 snap.certbot ?

真特么……

解决了,艹

1