conda / conda-package-streaming

An efficient library to read from new and old format .conda and .tar.bz2 conda packages.
https://conda.github.io/conda-package-streaming/
Other
10 stars 9 forks source link

Respect umask #65

Closed dholth closed 1 year ago

dholth commented 1 year ago

Description

This extends tarfile to apply umask (before ever creating the file with tar's default chown).

This should work if the program does not change its own umask. It is probably necessary to check umask with a global lock such as the one used by module level globals in the import system for thread safety.

Resolves https://github.com/conda/conda/issues/12829

jezdez commented 1 year ago

@awwad Do you have opinions on the way this was solved?

dholth commented 1 year ago

Does this affect the umask on implictly-created directories? (When we see an a/b/c/d.pywithout seeing directory entries for a/b/c in the tarfile?)