Hey! So I recently ran into an issue regarding directory ownership changes when extracting certain tar files.
How to reproduce:
You can test this out locally like so with docker
Start a new alpine container docker run -it --rm alpine ash
Create some random folder structure to archive mkdir -p ~/test/folder
Change to test dir cd ~/test
Change ownership to something random chown -R 1234:1234 .
Create an archive like so tar -zcf test.tar.gz .
And extract it somewhere tar -zxf test.tar.gz -C /var
Now the /var ownership is 1234:1234
The implications:
This means that if for example I extract the archive that is created in a similar manner to for example /root, it will mess up the root directory ownership (possibly) and can pretty much brick the instance
I understand that there are flags regarding ownership and permissions when extracting archives, but I do think that using the . should not make it so that after extracting the archive it changes ownership of the target directory