Index: custom-header.php
===================================================================
--- custom-header.php	(revision 20998)
+++ custom-header.php	(working copy)
@@ -675,6 +675,12 @@
 		} elseif ( $width > HEADER_IMAGE_WIDTH ) {
 			$oitar = $width / HEADER_IMAGE_WIDTH;
 			$image = wp_crop_image($file, 0, 0, $width, $height, HEADER_IMAGE_WIDTH, $height / $oitar, false, str_replace(basename($file), 'midsize-'.basename($file), $file));
+			//set permissions
+			$stat = @ stat( dirname( $image ) );
+			$perms = $stat['mode'] & 0007777;
+			$perms = $perms & 0000666;
+			@ chmod( $image, $perms );
+			clearstatcache();
 			if ( is_wp_error( $image ) )
 				wp_die( __( 'Image could not be processed.  Please go back and try again.' ), __( 'Image Processing Error' ) );
 
@@ -736,6 +742,12 @@
 		$original = get_attached_file($attachment_id);
 
 		$cropped = wp_crop_image( $attachment_id, (int) $_POST['x1'], (int) $_POST['y1'], (int) $_POST['width'], (int) $_POST['height'], HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT );
+		//set permissions
+		$stat = @ stat( dirname( $cropped ) );
+		$perms = $stat['mode'] & 0007777;
+		$perms = $perms & 0000666;
+		@ chmod( $cropped, $perms );
+		clearstatcache();
 		if ( is_wp_error( $cropped ) )
 			wp_die( __( 'Image could not be processed.  Please go back and try again.' ), __( 'Image Processing Error' ) );
 
