nextcloud / groupfolders

πŸ“πŸ‘©β€πŸ‘©β€πŸ‘§β€πŸ‘¦ Admin-configured folders shared by everyone in a group. https://github.com/nextcloud-releases/groupfolders
https://apps.nextcloud.com/apps/groupfolders
279 stars 85 forks source link

Groupfolders show with id instead of name in webdav/davfs #2527

Closed svoeth closed 1 month ago

svoeth commented 1 year ago

How to use GitHub

Steps to reproduce

  1. add one or more groupfolders
  2. view your folders via webdav

Expected behaviour

All folders are shown with their choosen name

Actual behaviour

Folders are shown with their chosen name for a very short time and are then renamed to their id There is a (very brief) discussion in the nextcloud forums with a short gif: https://help.nextcloud.com/t/groupfolders-show-with-id-instead-of-name-in-webdav-dvfs/168414

Server configuration

Operating system: Debian 12 (Bookworm)

Web server: Nginx 1.22.1-9

Database: MariaDB (not on the same server)

PHP version: 8.2

Nextcloud version: 27.0.2

Group folders version: 15.0.2

Updated from an older Nextcloud/ownCloud or fresh install: fresh install

Where did you install Nextcloud from: Source via ansible

Are you using external storage, if yes which one: local/s3/smb/sftp/... no

Are you using encryption: yes/no no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/Saml/... LDAP

Client configuration

Browser: n/a / Nemo file manager

Operating system: Debian 12 with cinnamon-desktop

Logs

Web server error log

Web server error log This is the log part when opening the folder via webdav. CENSORED%20FOLDERNAME (sorry, had to censor it, but it contains two words with a space in the middle), Admins, Allgemeines and Design are the current groupfolders (see gif in discussion mentioned above in "Actual behaviour") ``` 10.73.21.166 - voeth [25/Aug/2023:10:55:42 +0200] "PROPFIND /remote.php/dav/files/voeth/CENSORED%20FOLDERNAME HTTP/2.0" 207 396 "-" "gvfs/1.50.3" 10.73.21.166 - voeth [25/Aug/2023:10:55:42 +0200] "PROPFIND /remote.php/dav/files/voeth HTTP/2.0" 207 387 "-" "gvfs/1.50.3" 10.73.21.166 - voeth [25/Aug/2023:10:55:42 +0200] "PROPFIND /remote.php/dav/files/voeth HTTP/2.0" 207 1059 "-" "gvfs/1.50.3" 10.73.21.166 - voeth [25/Aug/2023:10:55:42 +0200] "PROPFIND /remote.php/dav/files/voeth HTTP/2.0" 207 256 "-" "gvfs/1.50.3" 10.73.21.166 - voeth [25/Aug/2023:10:55:42 +0200] "PROPFIND /remote.php/dav/files/voeth/Design HTTP/2.0" 207 377 "-" "gvfs/1.50.3" 10.73.21.166 - - [25/Aug/2023:10:55:42 +0200] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/2.0" 304 0 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0" 10.73.21.166 - voeth [25/Aug/2023:10:55:43 +0200] "PROPFIND /remote.php/dav/files/voeth/Templates%20credits.md HTTP/2.0" 207 395 "-" "gvfs/1.50.3" 10.73.21.166 - voeth [25/Aug/2023:10:55:43 +0200] "PROPFIND /remote.php/dav/files/voeth/Reasons%20to%20use%20Nextcloud.pdf HTTP/2.0" 207 402 "-" "gvfs/1.50.3" 10.73.21.166 - voeth [25/Aug/2023:10:55:43 +0200] "PROPFIND /remote.php/dav/files/voeth/Nextcloud%20Manual.pdf HTTP/2.0" 207 398 "-" "gvfs/1.50.3" 10.73.21.166 - voeth [25/Aug/2023:10:55:43 +0200] "PROPFIND /remote.php/dav/files/voeth/Nextcloud%20intro.mp4 HTTP/2.0" 207 392 "-" "gvfs/1.50.3" 10.73.21.166 - voeth [25/Aug/2023:10:55:43 +0200] "PROPFIND /remote.php/dav/files/voeth/Nextcloud.png HTTP/2.0" 207 379 "-" "gvfs/1.50.3" 10.73.21.166 - voeth [25/Aug/2023:10:55:43 +0200] "PROPFIND /remote.php/dav/files/voeth/Anleitung.md HTTP/2.0" 207 386 "-" "gvfs/1.50.3" 10.73.21.166 - voeth [25/Aug/2023:10:55:43 +0200] "PROPFIND /remote.php/dav/files/voeth/Templates HTTP/2.0" 207 379 "-" "gvfs/1.50.3" 10.73.21.166 - voeth [25/Aug/2023:10:55:43 +0200] "PROPFIND /remote.php/dav/files/voeth/Photos HTTP/2.0" 207 378 "-" "gvfs/1.50.3" 10.73.21.166 - voeth [25/Aug/2023:10:55:43 +0200] "PROPFIND /remote.php/dav/files/voeth/Notizen HTTP/2.0" 207 379 "-" "gvfs/1.50.3" 10.73.21.166 - voeth [25/Aug/2023:10:55:43 +0200] "PROPFIND /remote.php/dav/files/voeth/Documents HTTP/2.0" 207 380 "-" "gvfs/1.50.3" 10.73.21.166 - voeth [25/Aug/2023:10:55:43 +0200] "PROPFIND /remote.php/dav/files/voeth/Design HTTP/2.0" 207 377 "-" "gvfs/1.50.3" 10.73.21.166 - voeth [25/Aug/2023:10:55:43 +0200] "PROPFIND /remote.php/dav/files/voeth/CENSORED%20FOLDERNAME HTTP/2.0" 207 396 "-" "gvfs/1.50.3" 10.73.21.166 - voeth [25/Aug/2023:10:55:44 +0200] "PROPFIND /remote.php/dav/files/voeth/Allgemeines HTTP/2.0" 207 379 "-" "gvfs/1.50.3" 10.73.21.166 - voeth [25/Aug/2023:10:55:44 +0200] "PROPFIND /remote.php/dav/files/voeth/Admins HTTP/2.0" 207 377 "-" "gvfs/1.50.3" 10.73.52.3 - voeth [25/Aug/2023:10:55:46 +0200] "PROPFIND /remote.php/dav/files/voeth/ HTTP/1.1" 207 261 "-" "Mozilla/5.0 (Linux) mirall/3.9.1git (Nextcloud, manjaro-6.4.6-1-MANJARO ClientArchitecture: x86_64 OsArchitecture: x86_64)" ```

Nextcloud log (data/nextcloud.log)

Nextcloud log ``` log is empty (nightly rotation and system is not in full production yet) ```

Browser log

Browser log ``` no browser in play here There is nothing in syslog or journal ```
XueSheng-GIT commented 1 year ago

I'm using Ubuntu 22.04 with nautilus. The groupfolders are shown correctly with webdav. But if you enter such a groupfolder, the id is shown within the path: grafik

sunnyd24 commented 1 year ago

Issue #2430 refers. I suggested that group folder ID's should have friendly names, but the issue was closed without a resolution. If it was resolved, you wouldn't have these types of issues further down the line, when used in your use case as observed in your bug report using webdav/davfs. Suggest commenting in #2430 for it to be reopened and resolved.

XueSheng-GIT commented 1 year ago

@sunnyd24 These are different issues. Keeping the id for the raw filesystem does make sense to keep things simple. Accessing the raw filesystem directly is not an intended use case for a user.

But accessing the nextcloud data via dav is a common use case for a user and the folder names should be displayed in a user friendly way.

svoeth commented 1 year ago

I'm using Ubuntu 22.04 with nautilus. The groupfolders are shown correctly with webdav. But if you enter such a groupfolder, the id is shown within the path: grafik

that's funny. In my case it's the other way around and i see the foldername in the path (after clicking the folder which is named with the id)

antonwantstosleep commented 1 year ago

Is there any progress with this? How can we help?

undertstater commented 10 months ago

My finding: On one LinuxMint 21.2 I've installed first Nemo and later Nautilus. On Nemo I defined a webDAV Bookmark to a folder on my NextCloud containing some Groupfolders. As that showed the numbers instead of the groupfolder names, I installed Nautilus. Starting Nautilus the first time I already got the folder with the groupfolders as bookmark. Selecting that I saw the "good" names for the groupfolders. So it might be only an issue with Nemo on a NextCloud 25.0.x. With the version 24.0.12 of NextCloud that problem does not occure at all!

svoeth commented 10 months ago

Seems to be a nemo issue. Therefore it is moved here: https://github.com/linuxmint/nemo/issues/3331

Burnie09 commented 6 months ago

It is actually a bug in NextCloud. Some webdav clients (Nemo, Nautilus etc) asks for specific properties in PROPFIND, e.g. 'displayname'. And NextCloud then replies with the groupfolder id as the displayname.

I have added a quick workaround. (v. 28.0.1)

nextcloud-webdav-groupfolders.patch

svoeth commented 6 months ago

thx @Burnie09

reopening due to your find

Burnie09 commented 6 months ago

Here are a few requests and replies that makes the difference more clear, that some webdav clients asks for - and uses - displayname. (I have tidied it up a bit for readability)

Windows built-in webclient

PROPFIND /remote.php/dav/files/UserName/GroupFolder HTTP/1.1
User-Agent: Microsoft-WebDAV-MiniRedir/10.0.19044
Content-Length: 0
HTTP/1.1 207 Multi-Status
Date: Wed, 20 Mar 2024 02:52:43 GMT
Transfer-Encoding: chunked
Content-Type: application/xml; charset=utf-8

<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">
  <d:response>
    <d:href>/remote.php/dav/files/UserName/GroupFolder/</d:href>
    <d:propstat>
      <d:prop>
        <d:getlastmodified>Fri, 16 Feb 2024 13:15:37 GMT</d:getlastmodified>
        <d:resourcetype>
          <d:collection/>
        </d:resourcetype>
        <d:quota-used-bytes>0</d:quota-used-bytes>
        <d:quota-available-bytes>10737412742</d:quota-available-bytes>
        <d:getetag>&quot;65cffffee3333&quot;</d:getetag>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>
</d:multistatus>

Nautilus/gvfs

PROPFIND /remote.php/dav/files/UserName/GroupFolder HTTP/1.1
User-Agent: gvfs
Content-Length: 235

<?xml version="1.0" encoding="utf-8" ?>
<D:propfind xmlns:D="DAV:">
  <D:prop>
    <D:creationdate/>
    <D:displayname/>
    <D:getcontentlength/>
    <D:getcontenttype/>
    <D:getetag/>
    <D:getlastmodified/>
    <D:resourcetype/>
  </D:prop>
</D:propfind>
HTTP/1.1 207 Multi-Status
Date: Tue, 19 Mar 2024 10:35:18 GMT
Transfer-Encoding: chunked
Content-Type: application/xml; charset=utf-8

<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">
  <d:response>
    <d:href>/remote.php/dav/files/UserName/GroupFolder/</d:href>
    <d:propstat>
      <d:prop>
        <d:creationdate>1970-01-01T00:00:00+00:00</d:creationdate>
        <d:displayname>1</d:displayname>
        <d:getetag>&quot;65cffffee3333&quot;</d:getetag>
        <d:getlastmodified>Fri, 16 Feb 2024 13:15:37 GMT</d:getlastmodified>
        <d:resourcetype><d:collection/></d:resourcetype>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
    <d:propstat>
      <d:prop>
        <d:getcontentlength/>
        <d:getcontenttype/>
      </d:prop>
      <d:status>HTTP/1.1 404 Not Found</d:status>
    </d:propstat>
  </d:response>
</d:multistatus>
kesselb commented 6 months ago

Hi,

the PropFindPlugin in Groupfolder should be the better place to add this custom display name logic for group folders:

https://github.com/nextcloud/groupfolders/blob/d3a1f3739a578ec9baed53e518c76fe56dc804a6/lib/DAV/PropFindPlugin.php#L63

thekk1 commented 2 months ago

It is actually a bug in NextCloud. Some webdav clients (Nemo, Nautilus etc) asks for specific properties in PROPFIND, e.g. 'displayname'. And NextCloud then replies with the groupfolder id as the displayname.

I have added a quick workaround. (v. 28.0.1)

nextcloud-webdav-groupfolders.patch

This patch fixes this bug here for me as also this bug: https://github.com/nextcloud/server/pull/46694 Seems to be good solution for me.

ruedigerkupper commented 1 month ago

I see this problem in the web interface (NC 29): At first, the files app shows the folders with their correct names, but as soon as I enter them the name is replaced by the id: image

When I navigate up and out from the folder the file listing keeps showing the id for a second and then it is replaced by the literal name again.

kesselb commented 1 month ago

@ruedigerkupper different issue: https://github.com/nextcloud/groupfolders/issues/3068

ruedigerkupper commented 1 month ago

@kesselb Thanks for pointing me there!

svoeth commented 1 month ago

seems to be resolved by https://github.com/nextcloud/server/pull/46728 (as well as above mentioned #3068)