nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.44k stars 4.08k forks source link

[Bug]: NC27 - external storage - subfolder missing characters #39851

Open DSG5TRDD opened 1 year ago

DSG5TRDD commented 1 year ago

⚠️ This issue respects the following points: ⚠️

Bug description

An external storage is successfully mounted as WebDAV. The access works in principle. But in the subfolders the first two characters are missing. Both in Windows Explorer and in the browser.

Steps to reproduce

  1. Set up external connection
  2. call subfolder

Expected behavior

I expected to be able to browse the folders and access the files.

Installation method

None

Nextcloud Server version

25

Operating system

None

PHP engine version

None

Web server

None

Database engine version

None

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

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "27.0.2.1",
        "overwrite.cli.url": "https:\/\/***REMOVED SENSITIVE VALUE***\/nextcloud",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "ssl",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "filesystem_check_changes": 1,
        "allow_user_to_change_display_name": false,
        "updater.release.channel": "stable",
        "theme": "",
        "loglevel": 4,
        "log_rotate_size": 104857600,
        "mysql.utf8mb4": true,
        "maintenance": false,
        "default_phone_region": "DE",
        "app_install_overwrite": [
            "files_trackdownloads",
            "twofactor_admin"
        ],
        "updater.secret": "***REMOVED SENSITIVE VALUE***"
    }
}

List of activated Apps

Enabled:
  - activity: 2.19.0
  - admin_audit: 1.17.0
  - bruteforcesettings: 2.7.0
  - cloud_federation_api: 1.10.0
  - comments: 1.17.0
  - contactsinteraction: 1.8.0
  - dav: 1.27.0
  - federatedfilesharing: 1.17.0
  - federation: 1.17.0
  - files: 1.22.0
  - files_external: 1.19.0
  - files_pdfviewer: 2.8.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.0.2
  - logreader: 2.12.0
  - lookup_server_connector: 1.15.0
  - music: 1.8.4
  - nextcloud_announcements: 1.16.0
  - notifications: 2.15.0
  - oauth2: 1.15.1
  - password_policy: 1.17.0
  - photos: 2.3.0
  - privacy: 1.11.0
  - provisioning_api: 1.17.0
  - recommendations: 1.6.0
  - related_resources: 1.2.0
  - serverinfo: 1.17.0
  - settings: 1.9.0
  - sharebymail: 1.17.0
  - support: 1.10.0
  - systemtags: 1.17.0
  - text: 3.8.0
  - theming: 2.2.0
  - twofactor_admin: 4.2.0
  - twofactor_backupcodes: 1.16.0
  - twofactor_totp: 9.0.0
  - updatenotification: 1.17.0
  - user_status: 1.7.0
  - viewer: 2.1.0
  - weather_status: 1.7.0
  - workflowengine: 2.9.0
Disabled:
  - circles: 27.0.1 (installed 26.0.0)
  - dashboard: 7.7.0 (installed 7.1.0)
  - encryption: 2.15.0
  - files_trackdownloads: 1.11.0 (installed 1.11.0)
  - survey_client: 1.15.0 (installed 1.5.0)
  - suspicious_login: 5.0.0
  - user_ldap: 1.17.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

No response

Additional info

No response

DSG5TRDD commented 1 year ago

Installation method Webinstallation on VPS

Nextcloud Server version 27.0.2

Operating system Ubuntu 22.0.4

PHP engine version PHP 8.1

Web server Apache

Database engine version MariaDB

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

Are you using the Nextcloud Server Encryption module? No

Webbrowser grafik

Windows Explorer grafik

DSG5TRDD commented 1 year ago

Connection to WebDAV: grafik

joshtrichards commented 1 year ago

What WebDAV implementation on the remote?

DSG5TRDD commented 1 year ago

I'm afraid I don't know. The "1&1 OnlineSpeicher" is a free additional product to the DSL contract. It provides up to 100 GB of storage space, which can be connected via WebDAV, for example. Unfortunately, I could not find any further technical information.

https://hilfe-center.1und1.de/tarifoptionen-c85328/1und1-cloud-speicher-c84531/bedienen-c85548

Up to NextCloud 26.0.? the mounting worked without problems. I can't say exactly from which version the error occurred.

joshtrichards commented 1 year ago

Okay, understood.

Are the folders with missing characters accessible from Nextcloud when you click them or does clicking on them fail?

If it fails, please set to your loglevel to 2 and provide the stack trace/error from your Nextcloud log.

DSG5TRDD commented 1 year ago
[webdav] Fehler: Sabre\DAV\Exception\ServiceUnavailable: Sabre\HTTP\ClientHttpException: Not Found at <<closure>>

 0. /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php line 78
    OCA\DAV\Connector\Sabre\Directory->getChild()
 1. /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 971
    Sabre\DAV\Tree->getNodeForPath()
 2. /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1662
    Sabre\DAV\Server->getPropertiesIteratorForPath()
 3. /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1647
    Sabre\DAV\Server->writeMultiStatus()
 4. /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 346
    Sabre\DAV\Server->generateMultiStatus()
 5. /var/www/html/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->httpPropFind()
 6. /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 472
    Sabre\DAV\Server->emit()
 7. /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 253
    Sabre\DAV\Server->invokeMethod()
 8. /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 321
    Sabre\DAV\Server->start()
 9. /var/www/html/nextcloud/apps/dav/lib/Server.php line 364
    Sabre\DAV\Server->exec()
10. /var/www/html/nextcloud/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
11. /var/www/html/nextcloud/remote.php line 172
    require_once("/var/www/html/n ... p")

PROPFIND /nextcloud/remote.php/dav/files/DSG5TRDD/Filme/arrer%20Braun
from 109.XXX.YYY.226 by DSG5TRDD at 2023-08-15T14:56:06+00:00

It fails in Webbrowser.

When I manually enter the address in Windows Explorer, I can open the subfolder. grafik

DSG5TRDD commented 1 year ago

Update to Nextcloud 27.1.1 successful, but the error is still there.

joshtrichards commented 1 year ago

Thanks for the update. Two big clues you've provided are:

Up to NextCloud 26.0.? the mounting worked without problems. I can't say exactly from which version the error occurred.

It fails in Web browser When I manually enter the address in Windows Explorer, I can open the subfolder.

j-ed commented 1 year ago

What WebDAV implementation on the remote?

I've reported the same issue with #40828 . I'm using a Synology NAS as remote storage for all my files.

Up to NextCloud 26.0.? the mounting worked without problems. I can't say exactly from which version the error occurred.

I've updated my server from NC 26.0.7 to NC 27.1.1. After the upgrade the issue appeared for the first time.

Are the folders with missing characters accessible from Nextcloud when you click them or does clicking on them fail?

I can confirm what @DSG5TRDD reported. The file/directory cannot be accessed by clicking on it using the Web GUI, but if I enter the correct path to the file in the Firefox address line, I can access it without any issue.

@joshtrichards Let me know if you need me to provide additional information. As described in my original incident report, the issue also appears if the "occ files:scan" command is executed on the console. Therefore my assumption is, that there is an issue building the full path to a file or directory by combining the WebDAV path and the file name. I had in mind that we had a similar issue years ago and that something went wrong with the path length calculation, but I might be wrong.

sorbaugh commented 1 year ago

cc @icewind1991

j-ed commented 1 year ago

@joshtrichards @icewind1991 As described in my previous post, all files and directories below the mount point are displayed without the first two characters of their names. Today I found out, that a second mount, which I've created to directly access a directory below the initial one, shows its content without the first four character of their names.

mount1 -> mount-point-1/file-1    |
                       /file-2    | > first 2 characters not shown

mount2 -> mount-point-1/mount-point-2/file-3    |
                                     /file-4    | > first 4 characters not shown

For me it looks like the function to build the directory paths contains an error and cuts of two character to much with every directory level. Additionally it seems that the database gets more and more corrupted with every directory scan. Directories cannot be accessed anymore and files are not found anymore.

j-ed commented 1 year ago

@sorbaugh @joshtrichards @icewind1991 Could you already provide a rough estimation how likely it is that this issue will be fixed soon? I want to understand if it is worth to wait for a fix or if I should better try to downgrade my server to v26.x again to get the original function back. At the moment the file app functionality and desktop synchronization cannot be used reliable anymore and my users are already complaining about not being able to use the Nextcloud as they did in the past.