HomePhorge

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, 9:39 AM
themackabuPushed on Mar 25 2025, 8:07 PM
Parents
rPf05c3e41b9c4: Fixed localcommits include on getDiffDict
Branches
Unknown
Tags
Unknown

Event Timeline