Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Files inside tar archives are owned by 1001:127 + inconsistency in latest vs versioned tars ownership #416

Open
slowpeek opened this issue Nov 4, 2024 · 2 comments

Comments

@slowpeek
Copy link

slowpeek commented Nov 4, 2024

$ tar -tvf ffmpeg-master-latest-linux64-gpl.tar.xz | head -n1
drwxr-xr-x runner/docker     0 2024-11-04 17:38 ffmpeg-master-latest-linux64-gpl/
$ tar --numeric-owner -tvf ffmpeg-master-latest-linux64-gpl.tar.xz | head -n1
drwxr-xr-x 1001/127          0 2024-11-04 17:38 ffmpeg-master-latest-linux64-gpl/
$ tar -tvf ffmpeg-N-117703-gdf00705e00-linux64-gpl.tar.xz | head -n1
drwxr-xr-x 1001/127          0 2024-11-04 14:33 ffmpeg-N-117703-gdf00705e00-linux64-gpl/
  1. I guess, humans prefer everything inside tars to be owned by root.

  2. Latest tars keep ownership in symbolic and numerical form, while versioned ones only has numbers. Under some conditions, extracting both would make the files owned by different entities. Conditions:

    • extract as root
    • plain tar xf without --no-same-owner or --numeric-owner
    • there is a user runner with uid other than 1001 and/or there is a group docker with gid other than 127

    Under these conditions, tar would map runner:docker to something other than 1001:127 for the latest tars, and keep it 1001:127 for the versioned ones.

@BtbN
Copy link
Owner

BtbN commented Nov 4, 2024

That's simply the users tar runs as. The files are created very differently.
I don't immediately see how that's a problem with it, other than cosmetically?

@slowpeek
Copy link
Author

slowpeek commented Nov 4, 2024

It doesnt look clean to me. Like, if someone forgot about the final touch. It should be tar --owner root --group root .. where it packs versioned tars.

Upd: not --user, but --owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants