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