Commit bcc2c27e authored by dopry's avatar dopry

#333994 by Grunog2, Not setting file permissions on uploads. set perms to...

#333994 by Grunog2, Not setting file permissions on uploads.   set perms to 644 after file_save_upload in field_file.inc
parent 32984cd2
......@@ -86,6 +86,10 @@ function field_file_save_upload($source, $validators = array(), $dest = FALSE, $
if (!$file = file_save_upload($source, $validators, $dest, $replace)) {
return 0;
}
if (!@chmod($file->filepath, 0664)) {
watchdog('imageapi', 'Could not set permissons on destination file: %file', array('%file' => $file->filepath));
}
// Let modules add additional properties to the yet barebone file object.
foreach (module_implements('file_insert') as $module) {
$function = $module .'_file_insert';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment