From 9f3cdec3cdadd771a7c5e6f65f00543954995940 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Tue, 7 Mar 2006 19:41:35 +0100 Subject: fallback if umask() call doesn't work FS#736 darcs-hash:20060307184135-7ad00-9acd0c9e78976d348ae728dc491a7b7cebf5dd9d.gz --- inc/init.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/init.php b/inc/init.php index 10c7240d8..ab7cab3b8 100644 --- a/inc/init.php +++ b/inc/init.php @@ -181,8 +181,9 @@ function init_creationmodes(){ unset($conf['fperm']); unset($conf['dperm']); - // get system umask - $umask = umask(); + // get system umask, fallback to 0 if none available + $umask = @umask(); + if(!$umask) $umask = 0000; // check what is set automatically by the system on file creation // and set the fperm param if it's not what we want -- cgit v1.2.3