That was a “fun” debugging session…
That’s a feature, not a bug. It’s an archive after all.
I just assumed that whenever it would be expanded that the contents would have the default permissions for that user.
It’s actually a cool feature I just feel dumb for how long it took me to realize this was the issue.
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
Worse, it preserves “special” files like the ones in /dev or /var which aren’t removable by anyone other than root. Love extracting a system file backup in my file server as a regular user in order to get just a few files out of it, and promptly not being able to fully delete it afterward without SSHing into the server and using sudo.
I don’t get how a regular user can even create files like that. Sounds like a security vulnerability.
Learned to make use of this the hard way when transferring a directory over a FAT32 USB drive messed up the permissions.
Yeah I did notice that. Never really had a use for such a feature though.






