Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: NC 27.1.2.1 - corrupted directory tree #40828

Closed
5 of 8 tasks
j-ed opened this issue Oct 9, 2023 · 4 comments
Closed
5 of 8 tasks

[Bug]: NC 27.1.2.1 - corrupted directory tree #40828

j-ed opened this issue Oct 9, 2023 · 4 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 27-feedback bug

Comments

@j-ed
Copy link
Contributor

j-ed commented Oct 9, 2023

⚠️ This issue respects the following points: ⚠️

Bug description

At first I want to mention that I’m using Nextcloud for years now without having major issues with my configuration and installation.

End of September I decided to upgrade my server from Nextcloud 26.0.7 to 27.1.1. The installation itself worked without any issue but after a while I noticed that the Notes app caused errors because it couldn’t handle sub folders correctly anymore. Synchronization errors reported by the Nextcloud app pointed me to the issue. I checked the directory and file names using the web GUI and found-out, that it had been modified somehow and didn't look like the existing ones on the hard disk anymore. Due to the fact that I’m not using the Notes app very often and I couldn't find a pattern on a first glance, I decided to delete all sub folder below the Notes directory to get rid of the errors and wanted to wait for a new Notes app release. (It might be worth to know that the Notes folders is located on an external storage, which is being mounted using WebDAV.)

This week I’ve upgrade the server to Nextcloud 27.1.2 and again everything looked fine and I was able to use all functions as before. Yesterday I wanted to lookup some files and navigated to a sub folder, located on an external storage. Surprisingly all files and folders in that subdirectory were shown without the leading two characters of its names. It looks like something has corrupted the directory tree somehow, but other directories with sub folders in it, which exist in parallel of this one, are still being displayed correctly.

I tried to rescan the subdirectory by executing "./occ files:scan <user> -p /<user>/files/folder" but the command shows invalid file names too.

I’ve also tried to access Nextcloud using a different web browser or the Nextcloud app, but all are showing the corrupted files and directory names.

These are the names of the files and directories as they are shown in the web GUI:

20231008_nc_folder_error

These are the names of the files and directories as they exist on the hard disk:

eCards → CueCards
gene Musik → Eigene Musik
ergen → Juergen

Steps to reproduce

  1. Open the Files app in a web browser
  2. Open a sub folder, e.g. Dateien, which points to an external mount
  3. Check the files which are being displayed.

FYI, the sub folders name below "Dateien" is "CueCards" but as it can be seen from the log file, "/Dateien/eCards" are found and displayed.

The output of your Nextcloud log in Admin > Logging:

... ,"user":"juergen","app":"webdav","method":"PROPFIND","url":"/remote.php/dav/files/juergen/Dateien/eCards","message":"Sabre\\HTTP\\ClientHttpException: Not Found","userAgent":"Mozilla/5.0 (Windows) mirall/3.10.0stable-Win64 (build 20230915) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"27.1.2.1","exception":{"Exception":"Sabre\\DAV\\Exception\\ServiceUnavailable","Message":"Sabre\\HTTP\\ClientHttpException: Not Found","Code":0,"Trace":[{"file":"<path-to nextcloud-web-dir>/3rdparty/sabre/dav/lib/DAV/Tree.php","line":78,"function":"getChild","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["eCards"]},{"file":"<path-to nextcloud-web-dir>/3rdparty/sabre/dav/lib/DAV/Server.php","line":971,"function":"getNodeForPath","class":"Sabre\\DAV\\Tree","type":"->","args":["files/juergen/Dateien/eCards"]},{"file":"<path-to nextcloud-web-dir>/3rdparty/sabre/dav/lib/DAV/Server.php","line":1662,"function":"getPropertiesIteratorForPath","class":"Sabre\\DAV\\Server","type":"->","args":["files/juergen/Dateien/eCards",["{DAV:}resourcetype","{DAV:}getlastmodified","{DAV:}getcontentlength","{DAV:}getetag","{http://owncloud.org/ns}size","And 7 more entries, set log level to debug to see all entries"],1]},{"file":"<path-to nextcloud-web-dir>/3rdparty/sabre/dav/lib/DAV/Server.php","line":1647,"function":"writeMultiStatus","class":"Sabre\\DAV\\Server","type":"->","args":[["Sabre\\Xml\\Writer",[],"/remote.php/dav/",["d","s","oc","nc"],[]],["Generator"],false]},{"file":"<path-to nextcloud-web-dir>/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":346,"function":"generateMultiStatus","class":"Sabre\\DAV\\Server","type":"->","args":[["Generator"],false]},{"file":"<path-to nextcloud-web-dir>/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPropFind","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[["Sabre\\HTTP\\Request"],["Sabre\\HTTP\\Response"]]},{"file":"<path-to nextcloud-web-dir>/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:PROPFIND",[["Sabre\\HTTP\\Request"],["Sabre\\HTTP\\Response"]]]},{"file":"<path-to nextcloud-web-dir>/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[["Sabre\\HTTP\\Request"],["Sabre\\HTTP\\Response"]]},

Related log line in Apache access log

... "PROPFIND /remote.php/dav/files/juergen/Dateien/eCards HTTP/1.1" 404 243 "-" "Mozilla/5.0 (Windows) mirall/3.10.0stable-Win64 (build 20230915) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)" 1260 1142

Any ideas how this issue can be resolved are hightly appreciated.

I've just scanned the directories of an other user using "occ files:scan" and have seen the same issue. The first two characters of files in a sub directory are not shown anymore although they exist on the hard disk. It seems as if a general issue with the files scanning exists?!

Expected behavior

All file and directory names should be shown with the correct names so that it matches the existing file structure on the hard disk.

Installation method

Community Manual installation with Archive

Nextcloud Server version

27

Operating system

Other

PHP engine version

PHP 8.1

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Upgraded to a MAJOR version (ex. 22 to 23)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "installed": true,
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "<fqdn>"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "version": "27.1.2.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "nc_",
        "dbtype": "mysql",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "mysql.utf8mb4": true,
        "default_language": "de",
        "default_phone_region": "DE",
        "defaultapp": "files",
        "knowledgebaseenabled": true,
        "enable_avatars": true,
        "allow_user_to_change_display_name": true,
        "session_keepalive": true,
        "token_auth_enforced": false,
        "auth.bruteforce.protection.enabled": true,
        "skeletondirectory": "<path-to-nextcloud-skeleton-dir>",
        "mail_smtpdebug": false,
        "mail_smtpmode": "sendmail",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": 25,
        "mail_smtptimeout": 10,
        "mail_smtpsecure": "",
        "mail_smtpauth": false,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "https",
        "overwritehost": "<fqdn>",
        "overwritewebroot": "\/",
        "overwrite.cli.url": "https:\/\/<fqdn>",
        "overwritecondaddr": "",
        "htaccess.RewriteBase": "\/",
        "htaccess.IgnoreFrontController": false,
        "trashbin_retention_obligation": "auto",
        "versions_retention_obligation": "auto",
        "appcodechecker": true,
        "updatechecker": false,
        "updater.server.url": "https:\/\/updates.nextcloud.com\/updater_server\/",
        "updater.release.channel": "stable",
        "has_internet_connection": true,
        "check_for_working_webdav": true,
        "check_for_working_wellknown_setup": true,
        "check_for_working_htaccess": true,
        "config_is_read_only": false,
        "log_type": "file",
        "logfile": "<path-to-log-file>",
        "logdateformat": "Y-m-d H:i:sP",
        "loglevel": "2",
        "logtimezone": "Europe\/Berlin",
        "cron_log": false,
        "log_query": false,
        "log_rotate_size": false,
        "appstoreenabled": true,
        "upgrade.disable-web": true,
        "apps_paths": [
            {
                "path": "<path-to-nextcloud-web-dir>\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "<path-to-nextcloud-web-dir>\/apps2",
                "url": "\/apps2",
                "writable": true
            }
        ],
        "enable_previews": true,
        "preview_max_x": 1024,
        "preview_max_y": 1024,
        "preview_max_scale_factor": 10,
        "preview_max_filesize_image": 50,
        "enabledPreviewProviders": [
            "OC\\Preview\\BMP",
            "OC\\Preview\\GIF",
            "OC\\Preview\\HEIC",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\MP3",
            "OC\\Preview\\PNG",
            "OC\\Preview\\TIFF",
            "OC\\Preview\\TXT",
            "OC\\Preview\\XBitmap"
        ],
        "ldapUserCleanupInterval": 51,
        "maintenance": false,
        "cipher": "AES-256-CFB",
        "enable_certificate_management": true,
        "hashingCost": 10,
        "blacklisted_files": [
            ".htaccess"
        ],
        "theme": "",
        "memcache.local": "OC\\Memcache\\APCu",
        "memcache.locking": "OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "password": "***REMOVED SENSITIVE VALUE***",
            "timeout": 0
        },
        "cache_path": "",
        "minimum.supported.desktop.version": "2.0.0",
        "filesystem_check_changes": 1,
        "mount_file": "<path-to-nextcloud-data>\/mount.json",
        "filesystem_cache_readonly": false,
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "filelocking.ttl": 3600,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "bulkupload.enabled": false,
        "allow_local_remote_servers": true,
        "app_install_overwrite": [
            "twofactor_gateway"
        ]
    }
}

List of activated Apps

Enabled:
  - activity: 2.19.0
  - admin_audit: 1.17.0
  - announcementcenter: 6.6.2
  - audioplayer: 3.4.0
  - bookmarks: 13.1.1
  - bruteforcesettings: 2.7.0
  - calendar: 4.5.2
  - circles: 27.0.1
  - cloud_federation_api: 1.10.0
  - comments: 1.17.0
  - contacts: 5.4.2
  - contactsinteraction: 1.8.0
  - dav: 1.27.0
  - event_update_notification: 2.2.0
  - external: 5.2.1
  - federatedfilesharing: 1.17.0
  - federation: 1.17.0
  - files: 1.22.0
  - files_accesscontrol: 1.17.1
  - files_antivirus: 5.2.2
  - files_automatedtagging: 1.17.0
  - files_external: 1.19.0
  - files_pdfviewer: 2.8.0
  - files_photospheres: 1.27.0
  - files_reminders: 1.0.0
  - files_retention: 1.16.0
  - files_rightclick: 1.6.0
  - files_sharing: 1.19.0
  - files_trashbin: 1.17.0
  - files_versions: 1.20.0
  - firstrunwizard: 2.16.0
  - groupfolders: 15.3.1
  - guests: 2.5.0
  - impersonate: 1.14.0
  - logreader: 2.12.0
  - lookup_server_connector: 1.15.0
  - mail: 3.4.1
  - maps: 1.1.1
  - metadata: 0.19.0
  - news: 24.0.0
  - nextcloud_announcements: 1.16.0
  - notes: 4.8.1
  - notifications: 2.15.0
  - notify_push: 0.6.3
  - oauth2: 1.15.1
  - password_policy: 1.17.0
  - photos: 2.3.0
  - previewgenerator: 5.3.0
  - privacy: 1.11.0
  - provisioning_api: 1.17.0
  - related_resources: 1.2.0
  - serverinfo: 1.17.0
  - settings: 1.9.0
  - sharebymail: 1.17.0
  - side_menu: 3.10.3
  - smb_test: 0.3.7
  - spreed: 17.1.1
  - suspicious_login: 5.0.0
  - systemtags: 1.17.0
  - tasks: 0.15.0
  - text: 3.8.0
  - theming: 2.2.0
  - twofactor_admin: 4.3.0
  - twofactor_backupcodes: 1.16.0
  - twofactor_gateway: 0.20.0
  - twofactor_totp: 9.0.0
  - twofactor_webauthn: 1.2.0
  - unsplash: 2.2.1
  - updatenotification: 1.17.0
  - user_status: 1.7.0
  - viewer: 2.1.0
  - workflow_script: 1.12.0
  - workflowengine: 2.9.0
Disabled:
  - dashboard: 7.7.0 (installed 7.0.0)
  - encryption: 2.15.0
  - files_downloadactivity: 1.16.0 (installed 1.16.0)
  - files_reader: 1.5.3 (installed 1.5.3)
  - files_trackdownloads: 1.11.0 (installed 1.11.0)
  - recommendations: 1.6.0 (installed 0.6.0)
  - support: 1.10.0 (installed 1.4.0)
  - survey_client: 1.15.0 (installed 1.1.0)
  - user_ldap: 1.17.0
  - weather_status: 1.7.0 (installed 1.0.0)

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

See initial description.

Additional info

See initial description.

@j-ed j-ed added bug 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Oct 9, 2023
@szaimen
Copy link
Contributor

szaimen commented Oct 9, 2023

Cc @sorbaugh as this error seems quite bad

@kesselb
Copy link
Contributor

kesselb commented Oct 10, 2023

Possible duplicate #39851

@szaimen
Copy link
Contributor

szaimen commented Oct 10, 2023

Possible duplicate #39851

indeed

@szaimen szaimen closed this as completed Oct 10, 2023
@j-ed
Copy link
Contributor Author

j-ed commented Oct 10, 2023

Possible duplicate #39851

Yes, that sounds like a duplicate. In the provided examples two characters are removed from the files names too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 27-feedback bug
Projects
None yet
Development

No branches or pull requests

3 participants