Shutdown permission denied in snap

How snap apps can execute shutdown command. I add shutdown interface and connect it still can’t shutdown. snapcraft.yaml apps: ips: … plugs: [ serial-port, network-bind, power-control, shutdown ]

$sudo snap connect :shutdown :shutdown

$ snap version snap 2.56 snapd 2.56 series 16 kernel 5.4.0-113-generic

$ shutdown bash: /usr/sbin/shutdown: Permission denied

Does anyone have any suggestions?

the shutdown interface only allows access to the dbus shutdown call, see:

1 Like

I use dbus shutdown then it work. Thanks for your help!