Ticket #2190: dir.diff

File dir.diff, 729 bytes (added by ryan, 6 years ago)

umask test

  • wp-includes/cache.php

     
    310310                $dir_perms = $stat['mode'] & 0007777; // Get the permission bits. 
    311311                $file_perms = $dir_perms & 0000666; // Remove execute bits for files. 
    312312 
     313                $old_umask = umask(0); 
     314 
    313315                // Make the base cache dir. 
    314316                if (!file_exists($this->cache_dir)) { 
    315                         if (! @ mkdir($this->cache_dir)) 
     317                        if (! @ mkdir($this->cache_dir, $dir_perms)) 
    316318                                return false; 
    317319                        @ chmod($this->cache_dir, $dir_perms); 
    318320                } 
     
    362364 
    363365                $this->dirty_objects = array(); 
    364366 
     367                umask($old_umask); 
     368 
    365369                $this->release_lock(); 
    366370                 
    367371                if ( $errors )