upgrade-zulip: Add umask override.

We already override the umask in upgrade-zulip-stage-2, but that’s too
late since we’ve already written a bunch of files in stage 1.  I would
have removed the stage 2 override, but the OS upgrade documentation
references running stage 2 directly.

Fixes #15164.  Note that an affected installation will need to upgrade
twice, because the first upgrade uses the old stage 1.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2020-06-08 12:37:16 -07:00 committed by Tim Abbott
parent 47b4e45931
commit 523907fe1d
2 changed files with 6 additions and 0 deletions

View File

@ -20,6 +20,9 @@ deploy_options = get_deploy_options(config_file)
assert_running_as_root(strip_lib_from_paths=True)
# make sure we have appropriate file permissions
os.umask(0o22)
logging.Formatter.converter = time.gmtime
logging.basicConfig(format="%(asctime)s upgrade-zulip: %(message)s",
level=logging.INFO)

View File

@ -20,6 +20,9 @@ remote_url = get_config(config_file, 'deployment', 'git_repo_url', "https://gith
assert_running_as_root(strip_lib_from_paths=True)
# make sure we have appropriate file permissions
os.umask(0o22)
logging.Formatter.converter = time.gmtime
logging.basicConfig(format="%(asctime)s upgrade-zulip-from-git: %(message)s",
level=logging.INFO)