owncloud / core

:cloud: ownCloud web server core (Files, DAV, etc.)
https://owncloud.com
GNU Affero General Public License v3.0
8.38k stars 2.06k forks source link

zip file for download of multiple files appears corrupted #16656

Closed benedetto closed 9 years ago

benedetto commented 9 years ago

Steps to reproduce

  1. Select multiple files in the web interface and hit "download" to get a zip file containing all the files
  2. Download it to your computer
  3. Try to open it on a Linux system

    Expected behaviour

The file should open/extract into the selected files

Actual behaviour

If I try to open it with a Linux GUI program for archive handling (Ark in my case) I only get an error message telling me that the file cannot be opened because it is corrupted. If I instead try to extract it with the extraction function in the context menu of my file manager, the whole archive is extracted into a file that has the name and the content of the first file of the zip archive but the size of the whole archive.

If I use unzip download.zip on the command line instead, the archive is extracted correctly. This happens to me on both owncloud instances I administer and I had several Linux users complaining about the issue.

Server configuration

Server 1

Operating system: Ubuntu 12.04

Web server: Apache 2.4.7 (Ubuntu)

Database: Mysql 5.5.43

PHP version: 5.5.25

ownCloud version: (see ownCloud admin page) 8.0.3-4

Updated from an older ownCloud or fresh install: updated

List of activated apps:

The content of config/config.php:

<?php
$CONFIG = array (
  'instanceid' => '5252a2ecf1e01',
  'passwordsalt' => 'xxx',
  'datadirectory' => '/data/owncloud/data',
  'dbtype' => 'mysql',
  'version' => '8.0.3.4',
  'dbname' => 'owncloud',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'xxx',
  'dbpassword' => 'xxx',
  'installed' => true,
  'forcessl' => true,
  'theme' => '',
  'maintenance' => false,
  'log_type' => 'owncloud',
  'logfile' => '/var/log/owncloud.log',
  'logtimezone' => 'Europe/Berlin',
  'log_rotate_size' => 10485760,
  'overwritewebroot' => '/owncloud',
  'trusted_domains' => 
  array (
    0 => 'xxx',
  ),
  'secret' => 'xxx',
  'overwrite.cli.url' => '/owncloud',
);

Are you using external storage, if yes which one: local

Are you using encryption: no

Are you using an external user-backend, if yes which one: no

Server 2

Operating system: Debian 7

Web server: Apache 2.2.22 (Ubuntu)

Database: Mysql 5.5.43

PHP version: 5.4.39

ownCloud version: (see ownCloud admin page) 8.0.3-4

Updated from an older ownCloud or fresh install: updated

List of activated apps:

The content of config/config.php:

<?php
$CONFIG = array (
  'passwordsalt' => 'xxx',
  'datadirectory' => '/ext/ocdata',
  'dbtype' => 'mysql',
  'version' => '8.0.3.4',
  'dbname' => 'owncloud45',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'xxx',
  'dbpassword' => 'xxx',
  'installed' => true,
  'instanceid' => '50772500ab8c7',
  'forcessl' => true,
  'maintenance' => false,
  'theme' => '',
  'log_type' => 'syslog',
  'logfile' => '',
  'loglevel' => '1',
  'trusted_domains' => 
  array (
    0 => 'xxx',
  ),
  'overwritewebroot' => '/owncloud',
  'overwrite.cli.url' => '/owncloud',
  'secret' => 'xxx',
  'forceSSLforSubdomains' => true,
);

Are you using external storage, if yes which one: local

Are you using encryption: no

Are you using an external user-backend, if yes which one: no

Client configuration

Browser: Firefox

Operating system: Several Ubuntu flavours and versions

Logs

No suspicious log entries

LukasReschke commented 9 years ago

What version of ark are you using? Can you provide any information which libraries it uses? (maybe there is something in the help window?)

benedetto commented 9 years ago

In my case it's Ark 2.19 on KDE 4.14.2. According to apt it depends on

and recommends

I would guess that the archive handling is basically provided by libarchive12 and the recommended command line tools for the different zip formats.

DeepDiver1975 commented 9 years ago

Another funny ZipStreamer case? @McNetic you might be interested? THX a lot

PVince81 commented 9 years ago

Possible duplicate of https://github.com/owncloud/core/issues/18905

LukasReschke commented 9 years ago

Upstream: https://bugs.kde.org/show_bug.cgi?id=353266 + https://github.com/McNetic/PHPZipStreamer/issues/25

tl;dr: Not much we can do. Use another application to open the ZIP file.