According to the safe_copy() docstring, we do NOT want permissions preserved when preserve_meta=False:
|
preserve_meta toggles if file meta-data, like permissions, should be preserved. If you are |
|
copying baseline files, you should be within a SharedArea context manager and preserve_meta |
|
should be false so that the umask set up by SharedArea can take affect regardless of the |
|
permissions of the src files. |
However, they are preserved, and the SharedArea umask does not seem to be respected. This explains why sometimes CTSM baseline files on Izumi are only owner-readable.
Note that this bug only happens when using safe_copy on files directly; directories and their contents work fine.
Will submit a PR shortly that includes failing tests to illustrate, then fixes the bug.
According to the
safe_copy()docstring, we do NOT want permissions preserved whenpreserve_meta=False:cime/CIME/utils.py
Lines 1415 to 1418 in 7997bb9
However, they are preserved, and the
SharedAreaumask does not seem to be respected. This explains why sometimes CTSM baseline files on Izumi are only owner-readable.Note that this bug only happens when using
safe_copyon files directly; directories and their contents work fine.Will submit a PR shortly that includes failing tests to illustrate, then fixes the bug.