That was a “fun” debugging session…
Since no one has yet mentioned, by default if you’re running tar as a non-root user it extracts files with owner/umask of the current user and if you run it as root (or superuser) it’ll preserve ownership and permissions. From tar man page:
–no-same-owner
Extract files as yourself (default for ordinary users).
–no-same-permissions
Apply the user’s umask when extracting permissions from the archive (default for ordinary users).
As mentioned, with root the defaults are to keep UID/permissions as they are in the archive. (–preserve-permissions and --same-owner).
Just bear in mind that uid 1001 on one machine is not generally uid 1001 on another, and that if you copy the tar off machine you’re more than likely giving permission to somebody other than the intended target
That’s what an archiving program is supposed to do.