Files with apostrophe ' in their filename cause php-fpm to hang at 100% CPU load

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, 12.0.2):
13.0.6
Operating system and version (eg, Ubuntu 17.04):
FreeBSD 11.2
Apache or nginx version (eg, Apache 2.4.25):
nginx 1.14.0
PHP version (eg, 7.1):
7.2.9

The issue you are facing:

When I try to upload a file (with the desktop client) whose filename contains an apostrophe ' the php-fpm processes start to hang at 100% CPU load until I manually restart the service.

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

Steps to replicate it:

  1. Try to upload this image as Betty’s Bay, SA 1920x1080.jpg

The output of your Nextcloud log in Admin > Logging:

  • nothing revelant in the nextcloud logs

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

<?php
$CONFIG = array (
  'instanceid' => 'something',
  'passwordsalt' => 'somethingsomething',
  'secret' => 'somethingsomethingsomething',
  'trusted_domains' => 
  array (
    0 => 'something.example.com',
  ),
  'datadirectory' => '/mnt/storagebox/nextclouddata',
  'overwrite.cli.url' => 'https://something.example.com',
  'dbtype' => 'pgsql',
  'version' => '13.0.6.1',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => '',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'installed' => true,
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/usr/local/www/nextcloud/apps',
      'url' => '/apps',
      'writable' => true,
    ),
    1 => 
    array (
      'path' => '/usr/local/www/nextcloud/apps-pkg',
      'url' => '/apps-pkg',
      'writable' => false,
    ),
  ),
  'mail_from_address' => 'something',
  'mail_smtpmode' => 'php',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_domain' => 'example.com',
  'theme' => '',
  'loglevel' => 2,
  'maintenance' => false,
  'integrity.check.disabled' => true,
);

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

  • nothing useful in php-fpm.log or the nginx logs :frowning:

I am using the nginx webroot settings from here: Nginx configuration — Nextcloud 13 Administration Manual 13 documentation

I am wondering if this is an issue with my nginx/php-fpm config and not a Nextcloud bug? :thinking: Aside from the usual file size uploading hickups I had no big issues until I tried to upload some files with apostrophe in their names.

Does this happen only with files with apostrophes, or any other special characters as well?