如何修复 Incus 错误:You don't have the needed permissions to talk to the incus daemon
问题
当你尝试运行 incus 命令如
incus_permission_fix.sh
incus image list你看到如下错误消息
incus_permission_error.txt
Error: You don't have the needed permissions to talk to the incus daemon (socket path: /var/lib/incus/unix.socket)或
incus_permission_denied.txt
Error: Get "http://unix.socket/1.0": dial unix /var/lib/incus/unix.socket: connect: permission denied解决方案 1:首选:
将你的用户添加到 incus-admin 组:
add_user_incus_admin.sh
sudo usermod -aG incus-admin $USER你需要注销并重新登录才能使组更改生效。
解决方案 2:变通方法:
以 root 身份运行命令:
sudo_incus_list.sh
sudo incus image list这有效,因为 root 用户默认有权限访问 incus 守护进程。
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow