I ran into this issue recently, which is caused by the fact that the PHP finfo function in PHP 7.4 returns mimetype application/gzip for gzip-compressed files instead of mimetype application/x-gzip as earlier PHP versions had done. A bug report was filed, but it was decided that the change was an improvement so was not fixed (see https://bugs.php.net/bug.php?id=79681).
Since my system does not have multiple PHP versions installed, I could not use either of the solutions involving the use of earlier PHP versions.
Since my system repositories do not yet include drush 8.3.3 which is reported to resolve this issue, I was not able to use that solution either.
Instead, I patched drush locally (located in /usr/share/drush on my system) with the following patch, which worked for me:
--- includes/drush.inc.20180206 2020-09-21 07:49:26.161595136 +0200
+++ includes/drush.inc 2020-09-21 07:49:37.012533799 +0200
@@ -891,8 +891,8 @@
if (class_exists('finfo')) {
$finfo = new finfo(FILEINFO_MIME_TYPE);
$content_type = $finfo->file($filename);
+ drush_log(dt('Mime type (finfo) for !file is !ct.', array('!file' => $filename, '!ct' => $content_type)), LogLevel::DEBUG);
if ($content_type == 'application/octet-stream') {
- drush_log(dt('Mime type for !file is application/octet-stream.', array('!file' => $filename)), LogLevel::DEBUG);
$content_type = FALSE;
}
}
@@ -972,6 +972,7 @@
function drush_file_is_tarball($path) {
$content_type = drush_attempt_mime_content_type($path);
$supported = array(
+ 'application/gzip',
'application/x-bzip2',
'application/x-gzip',
'application/x-tar',