Getting core dump on cp folder then mv folder from tmp to snap's userdata dir

using above to restore data after snap version upgrade and detecting that from snap wrapper script but snap does work so its getting core dump on terminal or is it not good way to do this via wrapper.

15774 Bad system call (core dumped)

Are there security policy denials? You can see with:

$ sudo snap install snappy-debug
$ sudo snappy-debug.security scanlog

That said, I suspect it is going to report the following:

don't copy ownership of files (eg, use 'cp -r -preserve=mode' instead of 'cp -a')

Yep it did and I pretty much forgot to check for denials :expressionless:

= Seccomp =
Time: Feb 22 08:31:19
Log: auid=4294967295 uid=1000 gid=1000 ses=4294967295 pid=6276 comm="mv" exe="/bin/mv" sig=31 arch=c000003e 94(lchown) compat=0 ip=0x7fa88fdb0367 code=0x0
Syscall: lchown
Suggestions:
* don't copy ownership of files (eg, use 'cp -r --preserve=mode' instead of 'cp -a')
* try the snapcraft preload plugin: https://github.com/sergiusens/snapcraft-preload
* adjust program to not use 'lchown'

well I’m now using cp -r --preserve=mode instead of mv solves this issue.