--- modules/yui_editor/yui_editor.module
+++ modules/yui_editor/yui_editor.module
@@ -223,14 +223,14 @@
 }
 
 /**
- * Menu-callback for JavaScript-based uploads.
- */
+* Menu-callback for JavaScript-based uploads.
+*/
 function yui_editor_image_upload() {
   header("content-type: text/html"); // the return type must be text/html
   $response = null;
   $path = file_directory_path();
 
-  //Append trailing slash to path if not there 
+  //Append trailing slash to path if not there
   if (! (substr($path, -1) == '/')) {
     $path .= '/';
   }
@@ -240,8 +240,8 @@
     $response->status = 'Error Reading Uploaded File.';
     print drupal_to_js($response);
     exit;
-  }
-  
+  } else $chmod = chmod($file->filepath, 0766); //set the appropriate permissions. 
+ 
   $response->status = 'UPLOADED';
   $response->image_url = $file->filepath;
 
