/usr/bin/fold got permission denied but /usr/bin/fmt is working fine. What's happened?

there should be no need to as long as you use snapcrafts “apps” entry … this auto-generates a wrapper with a PATH entry pointing to $SNAP/bin, $SNAP/usr/bin etc etc … so “fold” should be executed from $SNAP (this indeed gets hairy if your binary usees full paths (which it shouldnt if you want to write portable code)).

in case you want more complex setups you can also take a look at the experimental layouts feature …

i.e. something like:

passthrough:
  layout:
    /usr/bin/fold
      bind: $SNAP/usr/bin/fold

should bind your shipped “fold” binary to the /usr/bin path and allow you to run it.

2 Likes