You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2023/03/04 22:43:10 UTC

[airflow] branch main updated: Mask out non-access bits when comparion file modes (#29886)

This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new ec31648be4 Mask out non-access bits when comparion file modes (#29886)
ec31648be4 is described below

commit ec31648be4c2fc4d4a7ef2bd23be342ca1150956
Author: Sam Wheating <sa...@gmail.com>
AuthorDate: Sat Mar 4 14:43:01 2023 -0800

    Mask out non-access bits when comparion file modes (#29886)
---
 airflow/utils/log/file_task_handler.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/airflow/utils/log/file_task_handler.py b/airflow/utils/log/file_task_handler.py
index 2b72abbc35..e1c9d5b504 100644
--- a/airflow/utils/log/file_task_handler.py
+++ b/airflow/utils/log/file_task_handler.py
@@ -440,7 +440,7 @@ class FileTaskHandler(logging.Handler):
             conf.get("logging", "file_task_handler_new_folder_permissions", fallback="0o775"), 8
         )
         directory.mkdir(mode=new_folder_permissions, parents=True, exist_ok=True)
-        if directory.stat().st_mode != new_folder_permissions:
+        if directory.stat().st_mode % 0o1000 != new_folder_permissions % 0o1000:
             print(f"Changing dir permission to {new_folder_permissions}")
             directory.chmod(new_folder_permissions)