Index: editor/filemanager/connectors/php/commands.php
===================================================================
--- editor/filemanager/connectors/php/commands.php	(revision 1583)
+++ editor/filemanager/connectors/php/commands.php	(working copy)
@@ -219,8 +219,20 @@
 
 					if ( is_file( $sFilePath ) )
 					{
+						if ( isset( $Config['ChmodOnUpload'] ) && !$Config['ChmodOnUpload'] )
+						{
+							break ;
+						}
+						
+						$permissions = 0777;
+						
+						if ( isset( $Config['ChmodOnUpload'] ) && $Config['ChmodOnUpload'] )
+						{
+							$permissions = $Config['ChmodOnUpload'] ;
+						}
+						
 						$oldumask = umask(0) ;
-						chmod( $sFilePath, 0777 ) ;
+						chmod( $sFilePath, $permissions ) ;
 						umask( $oldumask ) ;
 					}
 
Index: editor/filemanager/connectors/php/config.php
===================================================================
--- editor/filemanager/connectors/php/config.php	(revision 1583)
+++ editor/filemanager/connectors/php/config.php	(working copy)
@@ -47,20 +47,26 @@
 // following setting enabled.
 $Config['ForceSingleExtension'] = true ;
 
-// Perform additional checks for image files
-// if set to true, validate image size (using getimagesize)
+// Perform additional checks for image files.
+// If set to true, validate image size (using getimagesize).
 $Config['SecureImageUploads'] = true;
 
-// What the user can do with this connector
+// What the user can do with this connector.
 $Config['ConfigAllowedCommands'] = array('QuickUpload', 'FileUpload', 'GetFolders', 'GetFoldersAndFiles', 'CreateFolder') ;
 
-// Allowed Resource Types
+// Allowed Resource Types.
 $Config['ConfigAllowedTypes'] = array('File', 'Image', 'Flash', 'Media') ;
 
 // For security, HTML is allowed in the first Kb of data for files having the
 // following extensions only.
 $Config['HtmlExtensions'] = array("html", "htm", "xml", "xsd", "txt", "js") ;
 
+// After file is uploaded, sometimes it is required to change its permissions
+// so that it was possible to access it at the later time.
+// If possible, it is recommended to set more restrictive permissions, like 0755.
+// Set to 0 to disable this feature.
+// Note: not needed on Windows-based servers.
+$Config['ChmodOnUpload'] = 0777 ;
 /*
 	Configuration settings for each Resource Type
 
