Two plugs about system-files, but the result difference

I configured 2 plugs about system-file, the information and the etc-lvm-bakup, and added them into command ‘start’.
the plug etc-lvm-backup works well, I can read/write files in the path,
but there is something wrong about information, reading/writing operation are all denied.
What’s wrong with it?

Thank you!

grade: stable
confinement: strict
    interface: system-files

    interface: system-files

    interface: system-files

    plugin: dump
    command: bin/vlvmservice start $SNAP_DATA

Who knows why? Thank you

Same issue i have also faced !!

I fixed the formatting on your post so it’s easier to read and comment on the usage of system-files you have.

This snippet is redundant since write implies read for system-files.


It’s unclear what might be causing the problem for information, but if you have the interface connected, you will also need to make sure that the user trying to access the file has permission, as traditional unix MAC still applies, i.e. if the file is 0600 and owned by root, then only root can read/write that file.

What is the purpose of this system-files interface plug you have here? system-files does not support file globbing and so as declared this just allows reading those verbatim directories, not any files underneath those directories, and also the documentation for system-files reads:

Importantly, this interface should not be used as a means to give access to system files where the snap is not the clear owner (eg, /dev, /proc, /sys, /usr, etc).


So I’m curious what you’re trying to accomplish with this interface, perhaps there is a better interface that could be used instead to get the information or access you were trying to get with this.

Thanks for your work & reply.
What I want (with listed configure) are 2 goal:

  1. Create a install information file in /etc/visual_lvm(if it was not existing, create first) for upgrade, and delete it and /etc/visual_lvm with removing.
  2. Read files /etc/lvm/backup to analysis lvm information.

BTW: this application have to be run with root.