You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/03/14 19:12:36 UTC

[GitHub] [airflow] aggarwaldeepak commented on a change in pull request #7724: [AIRFLOW-1536] Inherit umask from parent process in daemon mode

aggarwaldeepak commented on a change in pull request #7724: [AIRFLOW-1536] Inherit umask from parent process in daemon mode
URL: https://github.com/apache/airflow/pull/7724#discussion_r392611916
 
 

 ##########
 File path: airflow/utils/cli.py
 ##########
 @@ -238,3 +238,12 @@ def sigquit_handler(sig, frame):  # pylint: disable=unused-argument
             if line:
                 code.append("  {}".format(line.strip()))
     print("\n".join(code))
+
+
+def get_umask():
+    """
+    Returns umask to control default file permission for new files
+    """
+    cur_mask = os.umask(0)
+    os.umask(cur_mask)
 
 Review comment:
   If I don't set it then the umask of for the rest of the execution is set to 0 and any files created by parent will be created with permissions 0666.  

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services