diff --git a/lib/filestorage/file_system_filedir.php b/lib/filestorage/file_system_filedir.php index 75338755316..d4c72838a82 100644 --- a/lib/filestorage/file_system_filedir.php +++ b/lib/filestorage/file_system_filedir.php @@ -402,7 +402,7 @@ public function add_file_from_path($pathname, $contenthash = null) { ignore_user_abort($prev); throw new file_exception('storedfilecannotcreatefile'); } - chmod($hashfile, $this->filepermissions); // Fix permissions if needed. + @chmod($hashfile, $this->filepermissions); // Fix permissions if needed. if (file_exists($hashfile.'.tmp')) { // Just in case anything fails in a weird way. @unlink($hashfile.'.tmp'); @@ -523,7 +523,7 @@ public function add_file_from_string($content) { ignore_user_abort($prev); throw new file_exception('storedfilecannotcreatefile'); } - chmod($hashfile, $this->filepermissions); // Fix permissions if needed. + @chmod($hashfile, $this->filepermissions); // Fix permissions if needed. if (file_exists($hashfile.'.tmp')) { // Just in case anything fails in a weird way. @unlink($hashfile.'.tmp');