@Greg Erskine
Thanks for testing, behavior is the same as for x86. The proposed patch very likely will stabilize mydata.tgz ownership for PiCore too.
I played a little with backup_done and backup_status files. The main idea that I've gathered is that no matter what user is running "filetool.sh -b". The message about permission violation is issued by
t_o_u_c_h /tmp/backup_done
and doesn't affects the backup functionality. Even if You see it (though it is not very pleasant) backup is being performed successfully and exit code is 0. In other words if backup_done was created by root, an attempt of non-privileged user to touch it will fail, but this means that file exists, so the touch goal is reached. I propose simply suppress the error message like:
t_o_u_c_h /tmp/backup_done 2>/dev/null
What's Your opinion?