WordPress.org

Make WordPress Core

Ticket #10170: 10170.patch

File 10170.patch, 487 bytes (added by hakre, 5 years ago)

Chmod after mkdir to ensure correct mode on newly created directory.

  • wp-admin/includes/class-wp-filesystem-direct.php

     
    202202 
    203203                if ( ! @mkdir($path, $chmod) ) 
    204204                        return false; 
     205                chmod($path, $chmod); // chmod $path because mkdir applies umask to $chmod  
    205206                if ( $chown ) 
    206207                        $this->chown($path, $chown); 
    207208                if ( $chgrp )