Page MenuHomePhabricator

D11819.diff
No OneTemporary

D11819.diff

diff --git a/scripts/daemon/launch_daemon.php b/scripts/daemon/launch_daemon.php
--- a/scripts/daemon/launch_daemon.php
+++ b/scripts/daemon/launch_daemon.php
@@ -20,6 +20,11 @@
$flags[] = '--load-phutil-library='.phutil_get_library_root($library);
}
+$umask_octal = PhabricatorEnv::getEnvConfig('phd.umask');
+if (! empty($umask_octal)) {
+ umask(octdec($umask_octal));
+}
+
// Add more flags.
array_splice($argv, 2, 0, $flags);
diff --git a/src/applications/config/option/PhabricatorPHDConfigOptions.php b/src/applications/config/option/PhabricatorPHDConfigOptions.php
--- a/src/applications/config/option/PhabricatorPHDConfigOptions.php
+++ b/src/applications/config/option/PhabricatorPHDConfigOptions.php
@@ -49,6 +49,13 @@
"of output, but can help debug issues. Daemons launched in debug ".
"mode with 'phd debug' are always launched in verbose mode. See ".
"also 'phd.trace'.")),
+ $this->newOption('phd.umask', 'string', null)
+ ->setLocked(true)
+ ->setSummary(pht('Process umask for phd daemons'))
+ ->setDescription(
+ pht(
+ 'Specify the phd daemon umask to override systems umask.'.
+ 'Examples: 077, 027, 007')),
$this->newOption('phd.user', 'string', null)
->setLocked(true)
->setSummary(pht('System user to run daemons as.'))

File Metadata

Mime Type
text/plain
Expires
May 12 2024, 5:06 AM (5 w, 1 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6283888
Default Alt Text
D11819.diff (1 KB)

Event Timeline