Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15445874
D15721.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D15721.id.diff
View Options
diff --git a/src/infrastructure/env/PhabricatorEnv.php b/src/infrastructure/env/PhabricatorEnv.php
--- a/src/infrastructure/env/PhabricatorEnv.php
+++ b/src/infrastructure/env/PhabricatorEnv.php
@@ -91,6 +91,7 @@
private static function initializeCommonEnvironment() {
PhutilErrorHandler::initialize();
+ self::resetUmask();
self::buildConfigurationSourceStack();
// Force a valid timezone. If both PHP and Phabricator configuration are
@@ -863,4 +864,17 @@
self::$cache = array();
}
+ private static function resetUmask() {
+ // Reset the umask to the common standard umask. The umask controls default
+ // permissions when files are created and propagates to subprocesses.
+
+ // "022" is the most common umask, but sometimes it is set to something
+ // unusual by the calling environment.
+
+ // Since various things rely on this umask to work properly and we are
+ // not aware of any legitimate reasons to adjust it, unconditionally
+ // normalize it until such reasons arise. See T7475 for discussion.
+ umask(022);
+ }
+
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 28, 4:18 PM (2 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7705323
Default Alt Text
D15721.id.diff (1 KB)
Attached To
Mode
D15721: Reset umask to 022 for all Phabricator processes
Attached
Detach File
Event Timeline
Log In to Comment