In some environments Iloha cant make dirs and files in data
directory also if it data dir have good permisions and ownered by
apache user. This is because umask setting override mkdir mode.

Attached patch correct this bug.

-- 
 .''`. Ondra 'Kepi' Kudlik
: :' : Debian GNU/Linux User
`. `'
  `-   http://www.nosoftwarepatents.com/cz/m/intro/index.html 

--- include/fs_path.inc 2004-08-09 07:16:18.000000000 +0200
+++ include/fs_path.inc.new     2005-10-29 20:47:02.000000000 +0200
@@ -27,7 +27,13 @@
                $partial_path = substr($path, 0, $offset);
                $exists = fs_exists($partial_path);
                //echo 'fs_m: 
'.$partial_path.','.realpath($partial_path).'('.$exists.")\n";
-               if (!fs_exists($partial_path) && !mkdir($partial_path, 0700)) 
return false;
+               // we must set umask, because it override mkdir mode
+               $oldumask = umask(0077);
+               if (!fs_exists($partial_path) && !mkdir($partial_path, 0700)) {
+                       umask($oldumask); // set it back
+                       return false;
+               }
+               umask($oldumask); // set it back
        }
        
        return true;

Attachment: signature.asc
Description: Digital signature

Reply via email to