Homec4science

Reset umask to 022 for all Phabricator processes

Authored by epriestley <git@epriestley.com> on Apr 15 2016, 18:39.

Description

Reset umask to 022 for all Phabricator processes

Summary:
Fixes T7475. If you do something like:

$ umask 123
$ ./bin/phd start

...the daemons might inherit the weird umask, do a git fetch with the weird umask, and end up creating files with weird permissions in repositories.

Instead, just normalize the umask to 022 in all cases. This is overwhelmingly the most common setting, and the one we assume things are configured with.

(When we want to force permissions to a certain setting, we do so explicitly.)

Test Plan:

  • Added var_dump(umask()) to observe umask.
  • Ran bin/phd, saw proper umask (18, which is decimal of 022 octal).
  • Set umask 123, then ran bin/phd, saw it correct properly again.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T7475

Differential Revision: https://secure.phabricator.com/D15721

Details

Committed
epriestley <git@epriestley.com>Apr 15 2016, 19:03
Pushed
aubortJan 31 2017, 17:16
Parents
rPHf05c3e41b9c4: Fixed localcommits include on getDiffDict
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH20bad9a4ba9d: Reset umask to 022 for all Phabricator processes (authored by epriestley <git@epriestley.com>).Apr 15 2016, 19:03