Browse Source

Updated permissions

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@20706 44c647ce-9c0f-0410-b52a-842ac1e357ba
padraic 16 years ago
parent
commit
9d139675f1
1 changed files with 12 additions and 10 deletions
  1. 12 10
      library/Zend/Cache/Backend/Static.php

+ 12 - 10
library/Zend/Cache/Backend/Static.php

@@ -47,15 +47,16 @@ class Zend_Cache_Backend_Static
      * @var array
      */
     protected $_options = array(
-        'public_dir'       => null,
-        'sub_dir'          => 'html',
-        'file_extension'   => '.html',
-        'index_filename'   => 'index',
-        'file_locking'     => true,
-        'cache_file_umask' => 0644,
-        'debug_header'     => false,
-        'tag_cache'        => null,
-        'disable_caching'  => false
+        'public_dir'            => null,
+        'sub_dir'               => 'html',
+        'file_extension'        => '.html',
+        'index_filename'        => 'index',
+        'file_locking'          => true,
+        'cache_file_umask'      => 0600,
+        'cache_directory_umask' => 0700,
+        'debug_header'          => false,
+        'tag_cache'             => null,
+        'disable_caching'       => false
     );
 
     /**
@@ -232,6 +233,7 @@ class Zend_Cache_Backend_Static
         if ($extension) $ext = $extension;
         $file = rtrim($pathName, '/') . '/' . $fileName . $ext;
         if ($this->_options['file_locking']) {
+            file_put_contents('/var/www/data.dump', $file.$data);
             $result = file_put_contents($file, $data, LOCK_EX);
         } else {
             $result = file_put_contents($file, $data);
@@ -262,7 +264,7 @@ class Zend_Cache_Backend_Static
         foreach ($parts as $part) {
             $directory = rtrim($directory, '/') . '/' . $part;
             if (!is_dir($directory)) {
-                mkdir($directory, $this->_octdec($this->_options['cache_file_umask']));
+                mkdir($directory, $this->_octdec($this->_options['cache_directory_umask']));
             }
         }
     }