Classic confinement mounting internal snap folder

Hi,

We are building a classic confinement snap (basically an IDE and tooling), but many parts of the binaries and scripts reference an internal folder to store and read files from. I know that layouts are not supported on classic confined snap, but is there a way of getting the same effect by mounting this directory somehow in a classic confined snap so that it appears that this folder is available but we are mounting to another folder on the system or SNAP_COMMON?

Thank you!

Classic confinement is intended to provide an environment very similar to what unconfined applications run in. So they run in the host system’s default mount namespace, and a permissive AppArmor profile. This means that we can’t modify the mount namespace without it also affecting non-snap processes on the system. So things like layouts and the content interface can’t be used from such a snap.

Other approaches you could take would be to use an environment variable or configuration file to tell your internal scripts where to store their data.