Open behrmann opened 2 months ago
My bad, the sandbox that made this necessary actually didn't catch the chown calls, so this explains why the errors from chown bubbled up. That being said, even if gyp could untar things with their uid from the tar, it shouldn't since it doesn't control the input and the uid might not exist on the system. Chowning to an effectively random number doesn't make a lot of sense.
Checklist
npm install && npm run lint && npm test
passesDescription of change
tar defaults to
true
forpreserveOwner
when run as root.In a user namespace one can be root, but not have the capability to chown files, e.g. because of a seccomp filter.
It doesn't make sense to preserve the owner anyway, root or not, since the owner in a tar is chosen by the side providing the tar file, so the user name might not be present in the system. Also, all other files written, would also have a different owner than what was extracted from the tar file.