Make WordPress Core


Ignore:
Timestamp:
01/02/2006 02:50:59 AM (21 years ago)
Author:
ryan
Message:

Preserve suid and sgid bits when creating new directories. fixes #2190

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions-post.php

    r3386 r3388  
    863863        // Give the new dirs the same perms as wp-content.
    864864        $stat = stat(ABSPATH . 'wp-content');
    865         $dir_perms = $stat['mode'] & 0000777;  // Get the permission bits.
     865        $dir_perms = $stat['mode'] & 0007777;  // Get the permission bits.
    866866
    867867        // Make sure we have an uploads dir
     
    930930        // Set correct file permissions
    931931        $stat = @ stat(dirname($new_file));
    932         $perms = $stat['mode'] & 0000777;
     932        $perms = $stat['mode'] & 0007777;
     933        $perms = $perms & 0000666;
    933934        @ chmod($new_file, $perms);
    934935
Note: See TracChangeset for help on using the changeset viewer.