Layout: <target-path> + symlink

Hi All,

I am new to snapcraft. The app that I am trying to snap has a hard-coded requirement to write to two logfiles in a directory that are created at run-time. In my snapcraft.yaml file, I can “dump” to build and install but when I launch, I can see an attempt to write in a read-only space inside the snap.

From the docs, the “layout” + “symlink” seems to be something I can use to map a “target-path” to a path under $SNAP_DATA instead. Unfortunately, the “target-path” in my layout is causing me a problem no matter how I configure it. What is the “target-path” actually? An absolute path? A relative path? The app I am trying to snap is in a subdirectory under my /home directory; does that pose a problem?

My confinement mode = strict (due to the use of a layout in my snapcraft.yaml).

Any clarification on best practices for layout/target-path/symlink would be greatly appreciated.

Thanks!