nextcloud / server

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

[Bug]: Unable to move shared folders #48844

Open WolleKette opened 4 days ago

WolleKette commented 4 days ago

⚠️ This issue respects the following points: ⚠️

Bug description

I have access to a hosted Nextcloud instance (29.05). If I now share a folder as user A with users B and C, it appears in their home directories. Both have been granted access with all rights.

However, user B can move the shared folder to any other local folder. This does not work for user C. He gets the message ‘Some files could not be moved’. Very strange! I'm absolutely sure that this still worked a few months ago.

I have tested moving in the browser under MacOS (Safari, Chrome) and under Windows (Firefox, Edge). The same behaviour everywhere.

Does anyone have any ideas what else I could try?

Steps to reproduce

  1. User A shares a folder Folder1 with user B and C.
  2. Folder1 appears in the root directory of B and C.
  3. User B and C creates a new folder ‘shares’ and wants to move Folder1 into it.
  4. This works for B, C receives an error message that some files could not be moved.

Expected behavior

It should generally be possible to move shared folders to local subdirectories.

Nextcloud Server version

29

Operating system

MacOS, Windows

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

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

airbenich commented 2 days ago

I can add some infos to @WolleKette as we are using the same installation:

Installation type: Docker – image: "nextcloud:30.0.1"

Browser-Console Log:

[DEBUG] files: Drag started 
Object { app: "files", uid: "testuser", level: 0, event: dragstart }
index.mjs:45:16
[WARN] @nextcloud/files: Accessing "Node.attributes.displayname" is deprecated, access it directly on the Node instance. 
Object { app: "@nextcloud/files", uid: "testuser", level: 0 }
index.mjs:51:16
[DEBUG] files: Drag ended 
Object { app: "files", uid: "testuser", level: 0 }
index.mjs:45:16
[DEBUG] files: Dropped 
Object { app: "files", uid: "testuser", level: 0, event: drop, folder: {…}, selection: (1) […], fileTree: File }
index.mjs:45:16
XHRMOVE
https://cloud.domain.tld/remote.php/dav/files/testuser/Test-folder
[HTTP/2 500  545ms]

[DEBUG] files: Unexpected Error "Invalid response: 500 "

Stack trace:
Xe@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:4060537
Ke@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:4060777
o@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:4075844
promise callback*44719/$t<@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:4075899
44719/$t@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:4075555
moveFile@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:4081501
64789/Vt/<@https://cloud.domain.tld/dist/files-main.js?v=cf263e82-29:1:43289
49264/add/</<@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:3603165
M@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:3600429
49264/add/<@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:3604195
add@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:3602929
Vt@https://cloud.domain.tld/dist/files-main.js?v=cf263e82-29:1:42519
Wt@https://cloud.domain.tld/dist/files-main.js?v=cf263e82-29:1:48489
async*onDrop@https://cloud.domain.tld/dist/files-main.js?v=cf263e82-29:1:64457
async*hn@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:2091141
n@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:2083873
85471/Yr/i._wrapper@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:2124022
EventListener.handleEvent*Yr@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:2124048
wt@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:2084160
Rr@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:2124429
_@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:2133272
h@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:2132581
85471/xi@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:2136571
85471/e.prototype._update@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:2112498
a@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:2144049
85471/e.prototype.get@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:2094618
e@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:2094531
85471/Ra.prototype.$mount/<@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:2144073
85471/Ra.prototype.$mount@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:2144291
init@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:2099397
85471/h/<@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:2132176
h@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:2132452
A@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:2133644
85471/E/<@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:2135430
E@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:2135483
85471/E/<@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:2135008
E@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:2135483
85471/E/<@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:2135008
E@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:2135483
85471/xi@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:2136619
85471/e.prototype._update@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:2112481
a@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:2144049
85471/e.prototype.get@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:2094618
85471/e.prototype.run@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:2095351
ia@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:2097324
85471/wn/<@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:2092169
bn@https://cloud.domain.tld/dist/core-common.js?v=cf263e82-29:1:2091568

Object { app: "files", uid: "testuser", level: 0, error: Error }
index.mjs:45:16
[ERROR] files: Error while copying or moving files 
Object { app: "files", uid: "testuser", level: 0, errors: (1) […] }
index.mjs:54:16

Server Error protocol:

[webdav] Fehler: Node for share not found, fileid: 76436
    MOVE /remote.php/dav/files/testuser/Test-folder
    von ###IPADDRESS### von testuser um 24.10.2024, 11:28:02

Server error protocol - details:

{
  "reqId": "IYVE4r7iHWEw4cFdPGYA",
  "level": 3,
  "time": "2024-10-24T09:28:02+00:00",
  "remoteAddr": "46.252.130.178",
  "user": "testuser",
  "app": "webdav",
  "method": "MOVE",
  "url": "/remote.php/dav/files/testuser/Test-folder",
  "message": "Node for share not found, fileid: 76436",
  "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:131.0) Gecko/20100101 Firefox/131.0",
  "version": "30.0.1.2",
  "exception": {
    "Exception": "OCP\\Files\\NotFoundException",
    "Message": "Node for share not found, fileid: 76436",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/html/lib/private/Files/View.php",
        "line": 1797,
        "function": "getNode",
        "class": "OC\\Share20\\Share",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/lib/private/Files/View.php",
        "line": 763,
        "function": "targetIsNotShared",
        "class": "OC\\Files\\View",
        "type": "->",
        "args": [
          "testuser",
          "/testuser/files/Test/Test-folder"
        ]
      },
      {
        "file": "/var/www/html/apps/dav/lib/Connector/Sabre/Directory.php",
        "line": 416,
        "function": "rename",
        "class": "OC\\Files\\View",
        "type": "->",
        "args": ["/Test-folder", "/Test/Test-folder"]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Tree.php",
        "line": 178,
        "function": "moveInto",
        "class": "OCA\\DAV\\Connector\\Sabre\\Directory",
        "type": "->",
        "args": [
          "Test-folder",
          "files/testuser/Test-folder",
          ["OCA\\DAV\\Connector\\Sabre\\Directory"]
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
        "line": 612,
        "function": "move",
        "class": "Sabre\\DAV\\Tree",
        "type": "->",
        "args": [
          "files/testuser/Test-folder",
          "files/testuser/Test/Test-folder"
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
        "line": 89,
        "function": "httpMove",
        "class": "Sabre\\DAV\\CorePlugin",
        "type": "->",
        "args": [["Sabre\\HTTP\\Request"], ["Sabre\\HTTP\\Response"]]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 472,
        "function": "emit",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          "method:MOVE",
          [["Sabre\\HTTP\\Request"], ["Sabre\\HTTP\\Response"]]
        ]
      },
      {
        "file": "/var/www/html/apps/dav/lib/Connector/Sabre/Server.php",
        "line": 43,
        "function": "invokeMethod",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [["Sabre\\HTTP\\Request"], ["Sabre\\HTTP\\Response"]]
      },
      {
        "file": "/var/www/html/apps/dav/lib/Server.php",
        "line": 370,
        "function": "start",
        "class": "OCA\\DAV\\Connector\\Sabre\\Server",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/apps/dav/appinfo/v2/remote.php",
        "line": 19,
        "function": "exec",
        "class": "OCA\\DAV\\Server",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/remote.php",
        "line": 146,
        "args": ["/var/www/html/apps/dav/appinfo/v2/remote.php"],
        "function": "require_once"
      }
    ],
    "File": "/var/www/html/lib/private/Share20/Share.php",
    "Line": 167,
    "message": "Node for share not found, fileid: 76436",
    "exception": [],
    "CustomMessage": "Node for share not found, fileid: 76436"
  },
  "id": "671a1327773b0"
}