Edit: The short question is: How do I give away access to files that my (non-priviledged) user currently owns. I would like to be unable to get access to them in any way. Please see the rest of the post for a more detailed description.
For some backups, I would like to copy files to a remote location. I would like these files to be secure, even in the case the local machine is compromised.
Initially, my plan was to
chown the remote files to root as soon as they were written. This would not allow access from the local machine anymore, but in case of disaster would allow me to recover from the remote machine (assuming that one is not breached of course). It turns out however that
chowning to another user is not allowed in Linux for security reasons. Is there another method to give away access to a file you currently own?
The remote machine is a raspberry pi running Raspbian Stretch and the local machine is running FreeNAS 11.0-U4. The local machine can
ssh to the remote machine as a non-privileged user. I would like permissions of this user on the remote machine as limited as possible.