Files and directories get numbers appended until filename is too long to sync

  • Nextcloud Server version (e.g., 29.x.x):
    • 32.0.2
  • Operating system and version (e.g., Ubuntu 24.04):
    • Debian 12
  • Web server and version (e.g, Apache 2.4.25):
    • Apache 2.4.65
  • PHP version (e.g, 8.3):
    • 8.2.29
  • Is this the first time you’ve seen this error? (Yes / No):
    • yes
  • When did this problem seem to first start?
    • yesterday after the last update
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • archive
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • no

Summary of the issue you are facing:

Numbers get appended to directories and files until the filename is too long to sync.
Example:
Management (3) (2) (2) (2) (2) (2) (2) (2) (2) (2) (2) (2) (2) (2) (2) (2) (2) (2) (2) (2)

It seems like the issue only affects shared files.

Steps to replicate it (hint: details matter!):

  1. sync starts

  2. it syncs

  3. notifications pop up that file names are too long to sync

Log entries

Nextcloud

post is too big, but can provide

Configuration

Nextcloud

Summary
{
    "system": {
        "maintenance": false,
        "config_is_read_only": true,
        "version": "32.0.2.2",
        "maintenance_window_start": 0,
        "integrity.check.disabled": false,
        "appcodechecker": true,
        "updatechecker": true,
        "updater.release.channel": "stable",
        "auth.bruteforce.protection.enabled": true,
        "loglevel": 2,
        "logfile": "\/var\/log\/nextcloud\/nextcloud.log",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***"
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "overwritehost": "***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "https",
        "htaccess.RewriteBase": "\/",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "filelocking.enabled": true,
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0
        },
        "allow_user_to_change_display_name": false,
        "remember_login_cookie_lifetime": 2592000,
        "session_keepalive": true,
        "defaultapp": "dashboard,files,calendar,forms,appointments",
        "default_language": "de",
        "default_locale": "de_AT",
        "default_phone_region": "AT",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_smtpauthtype": "LOGIN",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": true,
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "***REMOVED SENSITIVE VALUE***",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "twofactor_enforced": "true",
        "twofactor_enforced_groups": [
            "Internal members"
        ],
        "twofactor_enforced_excluded_groups": [
            "Interns"
        ],
        "enable_previews": true,
        "enabledPreviewProviders": [
            "OC\\Preview\\Image"
        ],
        "preview_max_x": 16384,
        "preview_max_y": 16384,
        "preview_max_scale_factor": 5,
        "preview_max_filesize_image": 512,
        "preview_max_memory": 1024,
        "activity_expire_days": 1095,
        "trashbin_retention_obligation": "90, auto",
        "versions_retention_obligation": "auto",
        "sharing.maxAutocompleteResults": 5,
        "sharing.minSearchStringLength": 2,
        "sharing.enable_share_accept": true,
        "installed": true,
        "theme": "",
        "app_install_overwrite": {
            "0": "news",
            "1": "files_antivirus",
            "2": "workflow_pdf_converter",
            "3": "deck",
            "4": "end_to_end_encryption",
            "5": "external",
            "6": "files_accesscontrol",
            "7": "files_automatedtagging",
            "8": "flow_notifications",
            "9": "groupfolders",
            "10": "maps",
            "11": "recognize",
            "13": "spreed",
            "14": "text2image_helper",
            "15": "workflow_ocr"
        },
        "app.mail.background-sync-interval": 300,
        "forbidden_filename_basenames": [
            "con",
            "prn",
            "aux",
            "nul",
            "com0",
            "com1",
            "com2",
            "com3",
            "com4",
            "com5",
            "com6",
            "com7",
            "com8",
            "com9",
            "com\u00b9",
            "com\u00b2",
            "com\u00b3",
            "lpt0",
            "lpt1",
            "lpt2",
            "lpt3",
            "lpt4",
            "lpt5",
            "lpt6",
            "lpt7",
            "lpt8",
            "lpt9",
            "lpt\u00b9",
            "lpt\u00b2",
            "lpt\u00b3"
        ],
        "forbidden_filename_characters": [
            "<",
            ">",
            ":",
            "\"",
            "|",
            "?",
            "*",
            "\\",
            "\/"
        ],
        "forbidden_filename_extensions": [
            " ",
            ".",
            ".filepart",
            ".part"
        ],
        "updater.secret": "***REMOVED SENSITIVE VALUE***"
    }
}

Apps

Summary
Enabled:
  - activity: 5.0.0-dev.0
  - analytics: 6.0.1
  - announcementcenter: 7.2.2
  - approval: 2.6.0
  - assistant: 2.10.0
  - audioplayer: 3.7.0
  - auto_groups: 1.6.2
  - bookmarks: 16.0.1
  - bruteforcesettings: 5.0.0-dev.0
  - calendar: 6.1.1
  - camerarawpreviews: 0.8.8
  - checksum: 2.0.3
  - circles: 32.0.0
  - cloud_federation_api: 1.16.0
  - collectives: 3.4.0
  - comments: 1.22.0
  - contacts: 8.1.1
  - contactsinteraction: 1.13.1
  - dashboard: 7.12.0
  - dav: 1.34.2
  - deck: 1.16.2
  - drawio: 3.1.2
  - end_to_end_encryption: 1.18.0
  - event_update_notification: 2.7.0
  - external: 7.0.0
  - federatedfilesharing: 1.22.0
  - files: 2.4.0
  - files_accesscontrol: 3.0.2
  - files_antivirus: 6.1.0
  - files_automatedtagging: 3.0.1
  - files_downloadlimit: 5.0.0-dev.0
  - files_fulltextsearch: 32.0.2
  - files_linkeditor: 1.1.23
  - files_pdfviewer: 5.0.0-dev.0
  - files_reminders: 1.5.0
  - files_sharing: 1.24.1
  - files_trashbin: 1.22.0
  - files_versions: 1.25.0
  - firstrunwizard: 5.0.0-dev.0
  - flow_notifications: 3.0.0
  - forms: 5.2.3
  - geoblocker: 0.5.18
  - group_default_quota: 0.1.13
  - group_everyone: 0.1.18
  - groupfolders: 20.1.4
  - groupquota: 0.2.3
  - integration_giphy: 2.2.0
  - integration_openai: 3.9.1
  - integration_peertube: 2.1.0
  - intros: 1.2.1
  - logreader: 5.0.0-dev.0
  - lookup_server_connector: 1.20.0
  - maps: 1.6.0
  - memegen: 1.1.3
  - metadata: 0.23.0
  - news: 27.2.0
  - nextcloud_announcements: 4.0.0-dev.0
  - notes: 4.12.4
  - notifications: 5.0.0-dev.0
  - notify_push: 1.2.1
  - oauth2: 1.20.0
  - password_policy: 4.0.0-dev.0
  - photos: 5.0.0-dev.1
  - polls: 8.5.0
  - privacy: 4.0.0-dev.0
  - profile: 1.1.0
  - provisioning_api: 1.22.0
  - quota_warning: 1.22.0
  - recognize: 10.0.6
  - recommendations: 5.0.0-dev.0
  - related_resources: 3.0.0-dev.0
  - secrets: 2.1.4
  - serverinfo: 4.0.0-dev.0
  - settings: 1.15.1
  - sharebymail: 1.22.0
  - side_menu: 5.1.3
  - sketch_picker: 2.3.0
  - spreed: 22.0.4
  - suspicious_login: 10.0.0-dev.0
  - systemtags: 1.22.0
  - tasks: 0.17.1
  - text: 6.0.1
  - text2image_helper: 1.0.2
  - text_templates: 1.2.1
  - theming: 2.7.0
  - twofactor_admin: 4.9.0
  - twofactor_backupcodes: 1.21.0
  - twofactor_email: 2.8.3
  - twofactor_nextcloud_notification: 6.0.0-dev.0
  - twofactor_totp: 14.0.0
  - twofactor_webauthn: 2.4.1
  - updatenotification: 1.22.0
  - uppush: 2.3.1
  - user_retention: 1.15.0
  - user_status: 1.12.0
  - users_picker: 1.2.2
  - viewer: 5.0.0-dev.0
  - welcome: 1.3.0
  - workflow_ocr: 1.32.1
  - workflow_pdf_converter: 3.0.0
  - workflowengine: 2.14.0
Disabled:
  - admin_audit: 1.22.0
  - app_api: 32.0.0 (installed 32.0.0)
  - appointments: 2.6.2 (installed 2.6.2)
  - call_summary_bot: 3.1.0 (installed 3.1.0)
  - encryption: 2.20.0
  - federation: 1.22.0 (installed 1.22.0)
  - files_confidential: 3.3.0 (installed 3.3.0)
  - files_external: 1.24.0
  - impersonate: 3.0.0 (installed 3.0.0)
  - integration_youtube: 0.6.1 (installed 0.6.1)
  - ownershiptransfer: 1.3.0 (installed 1.3.0)
  - support: 4.0.0-dev.0 (installed 1.6.0)
  - survey_client: 4.0.0-dev.0 (installed 1.11.0)
  - terms_of_service: 4.6.1 (installed 4.6.1)
  - user_ldap: 1.23.0
  - weather_status: 1.12.0 (installed 1.3.0)
  - webhook_listeners: 1.3.0 (installed 1.3.0)

please help :cry:

the issue seems resolved for now and there is also a suspect: client-push (+ the talk desktop app maybe)

(approx) steps i took to resolve this:

  1. reroute all traffic to a maintenance page to avoid interference
  2. database backup (+ file backup)
  3. update everything
  4. clear all issues in the admin panel
  5. disable some apps that aren’t mission critical (client_push for example)
  6. manually remove all entries with numbers appended in the oc_share database table
  7. manually remove all files with numbers appended in the accounts
  8. set correct route to nextcloud again

After those steps it seemed like those files/directories were gone for good, so I decided to enable some apps again.

When the client-push app was enabled those files suddenly started to appear again!

today those directories popped up again .. if anyone has any idea as to why, we would be very grateful!

Only post the lines from log, when the error appeared (corresponding date and time)

I have the same issue.

It only affects the few files that are shared to me from other local users. Those users are reporting that the filenames look normal (without any “(2)” appended)

I tried a few things to reproduce the issue:

  • It’s not just files. Directories that are shared with me are also affected.
  • I asked another user to share a new file with me and that file got affected immediately (appended by “(2) (2) (2) (2) (2) (2) (2) (2)…”)
  • The files that I share to other users don’t seem to be affected. (These other users don’t see any “(2)” appended to filenames.)

I’m on Linux (Fedora). It affects both the AppImage and the Flatpak client.

Server: Nextcloud Hub 25 Autumn (32.0.8)

@alexoz Do you have special characters in your Nextcloud username? I had other issues with that in the past and I wonder if this could be the cause too.