Download multiple files (zip file) not working

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 18.0.2): 18.0.4.2
Operating system and version (eg, Ubuntu 20.04): Debian Stretch
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.25
PHP version (eg, 7.1): 7.3

The issue you are facing:

I can download a single file just fine, but when i click the checkbox and go to Actions I can’t download anything.

Is this the first time you’ve seen this error? (Y/N):

No, it’s 100% reproducible.

Steps to replicate it:

  1. Select any file with the checkbox
  2. Go to Download
  3. Redirection to index.php without any error whatsoever

The output of your Nextcloud log in Admin > Logging:

Not much really, only some deprecation events

{"reqId":"DuCncpEadQD9bh9cvBBL","level":0,"time":"May 06, 2020 19:13:19","remoteAddr":"","user":"user","app":"no app in context","method":"GET","url":"/index.php/core/preview?fileId=124234&x=32&y=32","message":"Deprecated event type for \\OCP\\Files::postWrite: Symfony\\Component\\EventDispatcher\\GenericEvent","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36","version":"18.0.4.2"}                                                      
{"reqId":"RUrORyRZjiUDkHl35ipr","level":0,"time":"May 06, 2020 19:13:22","remoteAddr":"","user":"user","app":"no app in context","method":"GET","url":"/index.php/apps/files/","message":"Deprecated event type for OCA\\Files::loadAdditionalScripts: Symfony\\Component\\EventDispatcher\\GenericEvent","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36","version":"18.0.4.2"}                                 

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

{
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        ***REMOVED SENSITIVE VALUE***
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "mysql",
    "version": "18.0.4.2",
    "overwrite.cli.url": "https:\/\/cloud.simon-mueller.de",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "mail_smtpmode": "smtp",
    "mail_smtpsecure": "tls",
    "mail_sendmailmode": "smtp",
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpauthtype": "LOGIN",
    "mail_smtpauth": 1,
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "mysql.utf8mb4": true,
    "maintenance": false,
    "theme": "",
    "logdateformat": "F d, Y H:i:s",
    "filelocking.enabled": true,
    "filelocking.ttl": 300,
    "memcache.local": "\\OC\\Memcache\\APCu",
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "redis": {
        "host": "***REMOVED SENSITIVE VALUE***",
        "port": 0,
        "timeout": 0
    },
    "log_rotate_size": "10485760",
    "trashbin_retention_obligation": "auto, 180",
    "versions_retention_obligation": "auto, 365"
}

The output of your Apache/nginx/system log in /var/log/____:

/var/log/apache2/cloud.simon-mueller.de ssl_access_ssl.log:10421:I:P:V:6 - - [06/May/2020:20:37:08 +0200] "GET /index.php/apps/files/ajax/download.php?dir=%2F&files=test&downloadStartSecret=changedHTTP/1.1" 302 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36" /var/log/apache2/cloud.simon-mueller.de ssl_access_ssl.log-10422-I:P:V:6 - - [06/May/2020:20:37:08 +0200] "GET /index.php/apps/files/ HTTP/1.1" 200 9462 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36"                                                                     

Any help is appreciated.
I have tested this on official nextcloud demo and it works there, so it’s not a client/browser issue.

No real idea.

Perhaps you can dist-upgrade from Debian Stretch to Debian Buster.
Debian Stretch is supported until 2020 and with LTS until 2022.
With Debian Buster you get new versions e.g. php .

https://wiki.debian.org/LTS

You must dist-upgrade or reinstall in the next 2 years.
With dist-upgrade you can not dist-upgrade direct to Debian Bullseye.

Maybe there is something wrong with my apache configuration?

Currently, it looks like this:

# ************************************
# Vhost template in module puppetlabs-apache
# Managed by Puppet
# ************************************

<VirtualHost *:443>
  ServerName cloud.simon-mueller.de

  ## Vhost docroot
  DocumentRoot "/var/www/html/nextcloud"

  ## Directories, there should at least be a declaration for /var/www/html/nextcloud

  <Directory "/var/www/html/nextcloud">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Require all granted
    DirectoryIndex index.php
  </Directory>

  ## Logging
  ErrorLog "/var/log/apache2/cloud.simon-mueller.de ssl_error_ssl.log"
  ServerSignature Off
  CustomLog "/var/log/apache2/cloud.simon-mueller.de ssl_access_ssl.log" combined

  ## Header rules
  ## as per http://httpd.apache.org/docs/2.2/mod/mod_headers.html#header
  Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
  Header always set Content-Security-Policy "default-src 'self' 'unsafe-inline' 'unsafe-eval' data: https: ; frame-ancestors 'self' "
  Header always set X-Content-Type-Options "nosniff"
  Header always set X-XSS-Protection "1; mode=block"

  ## SSL directives
  SSLEngine on
  SSLCertificateFile      "/etc/letsencrypt/live/********/fullchain.pem"
  SSLCertificateKeyFile   "/etc/letsencrypt/live/********/privkey.pem"
  SSLCACertificatePath    "/etc/ssl/certs"
  SSLProtocol             all -SSLv2 -SSLv3
  SSLCipherSuite          HIGH+EECDH:HIGH+EDH:@STRENGTH

  ## Custom fragment
  ProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:9000/var/www/html/nextcloud/$1
</VirtualHost>

I couldn’t find any documentation with a full apache2 configuration example, only one for nginx.

Ok, I could solve it now on my own.

The directive with ProxyPassMatch is not needed. There is already a configuration file in /etc/apache2/conf-enabled/php7.3-fpm.conf.
The problem with my Custom Fragment was that it didn’t append the filename and the secret to the URL that was being passed to FPM. So instead of
https://fqdn/index.php/apps/files/ajax/download.php?dir=%2F&files=<FILENAME>&downloadStartSecret=<SECRET>
the URL being passed to FPM was:
https://fqdn/index.php/apps/files/ajax/download.php.

Thanks anyways. Maybe this helps somebody someday. :slight_smile: