HomePhabricator

Reset umask to 022 for all Phabricator processes

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

Provenance
epriestleyAuthored on Apr 15 2016, 4:39 PM
epriestleyPushed on Apr 15 2016, 5:03 PM
Reviewer
chad
Differential Revision
D15721: Reset umask to 022 for all Phabricator processes
Parents
rPf05c3e41b9c4: Fixed localcommits include on getDiffDict
Branches
Unknown
Tags
Unknown
Tasks
T7475: Reset umask explicitly in daemons
Build Status
Buildable 11755
Build 14728: Run Core Tests