How should my snap get permission to write data to file in sysfs?

Dears,

I’m creating a snap utility which need to write data to files in sysfs, for example, /sys/module/firmware_class/parameters/path.

I’ve added and connected plug hardware-observe in my snapcraft.yaml (the auto-connect interface was approved on Auto-connection request: quectel-firmware-switch). But when running the snap, the daemon program in it always fails with 'Permission denied' in journalctl log. However, the snap works in devmode and classic mode from local installation.

Do I have to use classic confinement for my utility in this case? Thanks for your help in advance.

No interface allows to write to this location. If your snap is in a brand store, you can open a support ticket asking for system files or device files interface.