nextcloud / nextcloud/server

Filenames with special characters (German "Umlaute") not found by "files:scan"

Open
#30,585 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 25-feedback bug feature: filesystem feature: occ hotspot: filename handling
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

Steps to reproduce
  1. Create a file containing special characters (e.g. test-aöü-test)
  2. Sync file to Nextcloud instance (by web ui, Linux client, Gnome file manager and integrated Nextcloud client)
  3. occ files:scan will say "stat: der Aufruf von statx für '/xxxx/test--test' ist fehlgeschlagen: Datei oder Verzeichnis nicht gefunden". (call of statx has failed, file not found).
Expected behaviour

File should be found whatever characters the filename contains.

Actual behaviour

The file is not found by the file scan. Note that the filename as shown by the command output is missing all non-ASCII(?) characters and therefore obviously wrong.
Also:
The file seems to be synced correctly (at least I hope so)! All clients and the web ui handle the file completely normally. So the error is not really obvious as long as you are not running the scan manually.
occ files:cleanup does not remove or notice this "missing" file.

Server configuration

Operating system:
Raspian OS, current version (32bit with 64bit kernel). Locale set to UTF8.de-DE

Web server:
Apache 2.4 with PHP-FPM

Database:
MariaDB 10.3
Locale of the tables set to utf8mb4_bin

PHP version:
8.0
Locale seems IMHO to be set correctly both for cli and fpm.

Nextcloud version: (see Nextcloud admin page)
22.2.3

Updated from an older Nextcloud/ownCloud or fresh install:
Long-running instance, migrated from ownCloud years ago.

Where did you install Nextcloud from:
tar package

Signing status:

Signing status
No errors have been found.

List of activated apps:

App list
Enabled:
  - accessibility: 1.8.0
  - activity: 2.15.0
  - bookmarks: 10.0.3
  - bruteforcesettings: 2.3.0
  - calendar: 3.0.4
  - circles: 22.1.1
  - cloud_federation_api: 1.5.0
  - comments: 1.12.0
  - contacts: 4.0.7
  - dav: 1.19.0
  - federatedfilesharing: 1.12.0
  - files: 1.17.0
  - files_external: 1.13.0
  - files_fulltextsearch: 22.0.1
  - files_pdfviewer: 2.3.1
  - files_retention: 1.11.1
  - files_rightclick: 1.1.0
  - files_sharing: 1.14.0
  - files_trashbin: 1.12.0
  - files_versions: 1.15.0
  - firstrunwizard: 2.11.0
  - fulltextsearch: 22.0.1
  - fulltextsearch_elasticsearch: 22.0.1
  - gpxpod: 4.3.0
  - impersonate: 1.9.0
  - logreader: 2.7.0
  - lookup_server_connector: 1.10.0
  - maps: 0.1.10
  - metadata: 0.15.0
  - nextcloud_announcements: 1.11.0
  - notes: 4.3.0
  - notifications: 2.10.1
  - oauth2: 1.10.0
  - password_policy: 1.12.0
  - passwords: 2021.12.20
  - privacy: 1.6.0
  - provisioning_api: 1.12.0
  - qownnotesapi: 21.12.0
  - richdocuments: 4.2.3
  - serverinfo: 1.12.0
  - settings: 1.4.0
  - sharebymail: 1.12.0
  - systemtags: 1.12.0
  - tasks: 0.14.2
  - text: 3.3.0
  - theming: 1.13.0
  - twofactor_backupcodes: 1.11.0
  - twofactor_nextcloud_notification: 3.3.1
  - twofactor_totp: 6.2.0
  - unroundedcorners: 1.0.3
  - updatenotification: 1.12.0
  - user_ldap: 1.12.1
  - viewer: 1.6.0
  - workflowengine: 2.4.0
Disabled:
  - admin_audit
  - collectives
  - contactsinteraction
  - dashboard
  - encryption
  - federation
  - files_markdown
  - files_texteditor
  - files_videoplayer
  - photos
  - recommendations
  - support
  - survey_client
  - user_status
  - weather_status

Nextcloud configuration:

Config report
{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "mydomain",
            "mydomain2"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "22.2.3.0",
        "overwrite.cli.url": "https:\/\/mydomain\/nextcloud",
        "overwritehost": "mydomain:8443",
        "overwritewebroot": "\/nextcloud",
        "htaccess.RewriteBase": "\/nextcloud",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "ldapIgnoreNamingRules": false,
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
        "default_language": "de",
        "default_locale": "de_DE",
        "default_phone_region": "DE",
        "defaultapp": "files",
        "mysql.utf8mb4": true,
        "maintenance": false,
        "theme": "",
        "loglevel": 3,
        "mail_smtpmode": "sendmail",
        "mail_smtpsecure": "tls",
        "mail_sendmailmode": "smtp",
        "mail_smtpauth": 1,
        "mail_smtpauthtype": "LOGIN",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "updater.release.channel": "stable",
        "has_rebuilt_cache": true,
        "trashbin_retention_obligation": "auto, 30",
        "versions_retention_obligation": "auto, 60",
        "session_keepalive": false,
        "auto_logout": false,
        "session_lifetime": 604800,
        "remember_login_cookie_lifetime": 63072000,
        "app_install_overwrite": [
            "ocdownloader",
            "twofactor_admin",
            "bruteforcesettings",
            "mindmap_app"
        ],
        "data-fingerprint": "830f24f7d337cd03c421a52196fcd5e8"
    }
}

Are you using external storage, if yes which one: local/smb/sftp/...
local, webdav
Are you using encryption: yes/no
no
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
ldap

LDAP configuration (delete this part if not used)
LDAP config
+-------------------------------+---------------------------------------------+
| Configuration                 | s01                                         |
+-------------------------------+---------------------------------------------+
| hasMemberOfFilterSupport      |                                             |
| homeFolderNamingRule          |                                             |
| lastJpegPhotoLookup           | 0                                           |
| ldapAgentName                 |                                             |
| ldapAgentPassword             | ***                                         |
| ldapAttributesForGroupSearch  |                                             |
| ldapAttributesForUserSearch   |                                             |
| ldapBackupHost                |                                             |
| ldapBackupPort                |                                             |
| ldapBase                      | dc=domain,dc=de                             |
| ldapBaseGroups                | ou=groups,dc=domain,dc=de                   |
| ldapBaseUsers                 | ou=people,dc=domain,dc=de                   |
| ldapCacheTTL                  | 7200                                        |
| ldapConfigurationActive       | 1                                           |
| ldapDefaultPPolicyDN          |                                             |
| ldapDynamicGroupMemberURL     |                                             |
| ldapEmailAttribute            | mail                                        |
| ldapExperiencedAdmin          | 0                                           |
| ldapExpertUUIDGroupAttr       |                                             |
| ldapExpertUUIDUserAttr        |                                             |
| ldapExpertUsernameAttr        |                                             |
| ldapExtStorageHomeAttribute   |                                             |
| ldapGidNumber                 | gidNumber                                   |
| ldapGroupDisplayName          | cn                                          |
| ldapGroupFilter               | (&(|(objectclass=groupOfNames)))            |
| ldapGroupFilterGroups         |                                             |
| ldapGroupFilterMode           | 0                                           |
| ldapGroupFilterObjectclass    | groupOfNames                                |
| ldapGroupMemberAssocAttr      | member                                      |
| ldapHost                      | localhost                                   |
| ldapIgnoreNamingRules         |                                             |
| ldapLoginFilter               | (&(|(objectclass=inetOrgPerson))(uid=%uid)) |
| ldapLoginFilterAttributes     |                                             |
| ldapLoginFilterEmail          | 0                                           |
| ldapLoginFilterMode           | 0                                           |
| ldapLoginFilterUsername       | 1                                           |
| ldapMatchingRuleInChainState  | unknown                                     |
| ldapNestedGroups              | 0                                           |
| ldapOverrideMainServer        |                                             |
| ldapPagingSize                | 500                                         |
| ldapPort                      | 389                                         |
| ldapQuotaAttribute            |                                             |
| ldapQuotaDefault              |                                             |
| ldapTLS                       | 0                                           |
| ldapUserAvatarRule            | default                                     |
| ldapUserDisplayName           | displayname                                 |
| ldapUserDisplayName2          |                                             |
| ldapUserFilter                | (|(objectclass=inetOrgPerson))              |
| ldapUserFilterGroups          |                                             |
| ldapUserFilterMode            | 0                                           |
| ldapUserFilterObjectclass     | inetOrgPerson                               |
| ldapUuidGroupAttribute        | auto                                        |
| ldapUuidUserAttribute         | auto                                        |
| turnOffCertCheck              | 0                                           |
| turnOnPasswordChange          | 0                                           |
| useMemberOfToDetectMembership | 1                                           |
+-------------------------------+---------------------------------------------+

Client configuration

Browser:
Brave, Firefox in current versions
Nextcloud client 3.4.1 and 3.3.6 on Linux
Current client on Android
...

Operating system:
Linux, Android

Logs
Web server error log
Web server error log
No errors
Nextcloud log (data/nextcloud.log)
Nextcloud log
No errors in the log during occ files:scan
Browser log
Browser log
IMHO not relevant

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the occ files:scan entry point and a filename containing German umlauts such as test-aöü-test. Trace how the scan constructs and passes the reported filesystem path, then verify that the existing file is found without dropping non-ASCII characters. No specific source file or test is named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.