potiuk commented on code in PR #29495:
URL: https://github.com/apache/airflow/pull/29495#discussion_r1112320830
##########
airflow/configuration.py:
##########
@@ -1545,6 +1548,12 @@ def initialize_config() -> AirflowConfigParser:
return local_conf
+def make_group_other_inaccessible(file_path: str):
+ with suppress(Exception):
+ permissions = os.stat(file_path)
+ os.chmod(file_path, permissions.st_mode & (stat.S_IRUSR |
stat.S_IWUSR))
Review Comment:
I'd say log an error, not to raise it. There might be various reasons why
changing permissions is not possible - for example when the filesystem config
file gets generated on happens to be NFS. Failing hard in this case is kinda
strange at this point as the file has already been generated (so next time if
we run airflow it will succeed because the whole branch is skiped in this case.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]