Etag issue on sync and can't delete files locally

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via 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:


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


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): 20.0.4
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.41
PHP version (eg, 7.1): 7.4

The issue you are facing:
I connected a client via the fedora 33 nextcloud client package to a freshly installed server, but got some errors on file sync:
No E-Tag received from server, check Proxy/Gateway

it seems this error occured for all files that have a space in their name. Also, via the web interface, I can’t open these files nor delete them. The files that have the issue are all the standard files upon installation with a space in their name:
Documents/Nextcloud flyer.pdf
Documents/Welcome to Nextcloud Hub.docx
Photos/Nextcloud community.jpg
etc …

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

Steps to replicate it:

  1. install nextcloud server
  2. install client
  3. sync

The output of your Nextcloud log in Admin > Logging:

Nothing really relevant in this log

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

  'memcache.local' => '\\OC\\Memcache\\APCu',

(nothing else of interest, this is a clean installation)

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

- - [23/Dec/2020:01:00:32 +0100] "GET /remote.php/dav/files/92834fec-0b58-102c-8329-dd07bde33ea1/Documents/Nextcloud%20flyer.pdf HTTP/1.1" 200 1746 "-" "Mozilla/5.0 (Linux) mirall/2.6.5git (Nextcloud)"

(I showed 1 get line for a file with spaces, no errors, also nothing in the php-fpm logs).
I know other tickets exist with the same problem, but I don’t have litespeed nor is it linked to certain extensions (one image with a space has it, the others don’t).
My virtual host config in apache:

<VirtualHost *:443>
    DocumentRoot /var/www/nextcloud/nextcloud-html
    ServerName  xxxxx
    <Directory /var/www/nextcloud/nextcloud-html>
        Require all granted
        AllowOverride All
        Options FollowSymLinks MultiViews
        <IfModule mod_dav.c>
            Dav off
    ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://$1
    Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains;"

SSLCertificateFile /etc/letsencrypt/live/xxx/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/xxx/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf

Putting local files in the synced folder is the same issue: files without spaces get synced ok, files with spaces have issues upon syncing to the remote nextcloud server: “the server did not acknowledge the last chunk. (No E-Tag was present)”

Ok, found the issue (thanks to looking further to tickets mentioning space issues).
it seems apache should have this config:

<FilesMatch \.php$>
  SetHandler "proxy:fcgi://"

(or use LocationMatch if you like that, sometimes better)
and not:

    ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://$1