Make WordPress Core

Ticket #1784: patch.txt

File patch.txt, 1.2 KB (added by error, 21 years ago)

Use correct permissions, already!

Line 
1Index: admin-functions.php
2===================================================================
3--- admin-functions.php (revision 2962)
4+++ admin-functions.php (working copy)
5@@ -1510,7 +1510,7 @@
6 if ( ! file_exists( $path ) ) {
7 if ( ! mkdir( $path ) )
8 return array('error' => "Unable to create directory $path. Is its parent directory writable by the server?");
9- @ chmod( ABSPATH . $path, 0774 );
10+ @ chmod( ABSPATH . $path, 0755 );
11 }
12
13 // Generate the yearly and monthly dirs
14@@ -1524,14 +1524,14 @@
15 if ( ! file_exists( $pathy ) ) {
16 if ( ! mkdir( $pathy ) )
17 return array('error' => "Unable to create directory $pathy. Is $path writable?");
18- @ chmod( $pathy, 0774 );
19+ @ chmod( $pathy, 0755 );
20 }
21
22 // Make sure we have a monthly dir
23 if ( ! file_exists( $pathym ) ) {
24 if ( ! mkdir( $pathym ) )
25 return array('error' => "Unable to create directory $pathym. Is $pathy writable?");
26- @ chmod( $pathym, 0774 );
27+ @ chmod( $pathym, 0755 );
28 }
29
30 $uploads = array('path' => $pathym, 'url' => get_option('siteurl') . "/$dir/$y/$m", 'error' => false);