nextcloud / server

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

[Bug]: External storage failing on some shares #44366

Open oculos opened 7 months ago

oculos commented 7 months ago

⚠️ This issue respects the following points: ⚠️

Bug description

I have installed 29 Beta 4. I got this problem with a few shares on External storage:

{"reqId":"1Adn4gWfs1DGF0ZLhMbM","level":2,"time":"2024-03-20T18:02:48+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"External storage not available: Invalid request for / (ForbiddenException)","userAgent":"--","version":"29.0.0.11","exception":{"Exception":"OCP\\Files\\ForbiddenException","Message":"Invalid request for / (ForbiddenException)","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php","line":368,"function":"getFileInfo","class":"OCA\\Files_External\\Lib\\Storage\\SMB","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Common.php","line":470,"function":"stat","class":"OCA\\Files_External\\Lib\\Storage\\SMB","type":"->"},{"file":"/var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php","line":760,"function":"test","class":"OC\\Files\\Storage\\Common","type":"->"},{"file":"/var/www/nextcloud/apps/files_external/lib/Command/StorageAuthBase.php","line":117,"function":"test","class":"OCA\\Files_External\\Lib\\Storage\\SMB","type":"->"},{"file":"/var/www/nextcloud/apps/files_external/lib/Command/Scan.php","line":76,"function":"createStorage","class":"OCA\\Files_External\\Command\\StorageAuthBase","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/symfony/console/Command/Command.php","line":298,"function":"execute","class":"OCA\\Files_External\\Command\\Scan","type":"->"},{"file":"/var/www/nextcloud/core/Command/Base.php","line":177,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/console/Application.php","line":1040,"function":"run","class":"OC\\Core\\Command\\Base","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/console/Application.php","line":301,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/console/Application.php","line":171,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/nextcloud/lib/private/Console/Application.php","line":213,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/nextcloud/console.php","line":113,"function":"run","class":"OC\\Console\\Application","type":"->"},{"file":"/var/www/nextcloud/occ","line":11,"args":["/var/www/nextcloud/console.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php","Line":215,"Previous":{"Exception":"Icewind\\SMB\\Exception\\ForbiddenException","Message":"Invalid request for / (ForbiddenException)","Code":13,"Trace":[{"file":"/var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php","line":75,"function":"fromMap","class":"Icewind\\SMB\\Exception\\Exception","type":"::"},{"file":"/var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php","line":92,"function":"handleError","class":"Icewind\\SMB\\Native\\NativeState","type":"->"},{"file":"/var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php","line":351,"function":"testResult","class":"Icewind\\SMB\\Native\\NativeState","type":"->"},{"file":"/var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeShare.php","line":305,"function":"getxattr","class":"Icewind\\SMB\\Native\\NativeState","type":"->"},{"file":"/var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeFileInfo.php","line":43,"function":"getAttribute","class":"Icewind\\SMB\\Native\\NativeShare","type":"->"},{"file":"/var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeFileInfo.php","line":69,"function":"stat","class":"Icewind\\SMB\\Native\\NativeFileInfo","type":"->"},{"file":"/var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeShare.php","line":114,"function":"getSize","class":"Icewind\\SMB\\Native\\NativeFileInfo","type":"->"},{"file":"/var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php","line":201,"function":"stat","class":"Icewind\\SMB\\Native\\NativeShare","type":"->"},{"file":"/var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php","line":368,"function":"getFileInfo","class":"OCA\\Files_External\\Lib\\Storage\\SMB","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Common.php","line":470,"function":"stat","class":"OCA\\Files_External\\Lib\\Storage\\SMB","type":"->"},{"file":"/var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php","line":760,"function":"test","class":"OC\\Files\\Storage\\Common","type":"->"},{"file":"/var/www/nextcloud/apps/files_external/lib/Command/StorageAuthBase.php","line":117,"function":"test","class":"OCA\\Files_External\\Lib\\Storage\\SMB","type":"->"},{"file":"/var/www/nextcloud/apps/files_external/lib/Command/Scan.php","line":76,"function":"createStorage","class":"OCA\\Files_External\\Command\\StorageAuthBase","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/symfony/console/Command/Command.php","line":298,"function":"execute","class":"OCA\\Files_External\\Command\\Scan","type":"->"},{"file":"/var/www/nextcloud/core/Command/Base.php","line":177,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/console/Application.php","line":1040,"function":"run","class":"OC\\Core\\Command\\Base","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/console/Application.php","line":301,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/console/Application.php","line":171,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/nextcloud/lib/private/Console/Application.php","line":213,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/nextcloud/console.php","line":113,"function":"run","class":"OC\\Console\\Application","type":"->"},{"file":"/var/www/nextcloud/occ","line":11,"args":["/var/www/nextcloud/console.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Exception/Exception.php","Line":44},"message":"External storage not available: Invalid request for / (ForbiddenException)","exception":{},"CustomMessage":"External storage not available: Invalid request for / (ForbiddenException)"}}

Steps to reproduce

  1. Open an external storage folder
  2. No file is shown
  3. Log is full of errors

Expected behavior

To get the share mounted

Installation method

Community Docker image

Nextcloud Server version

master

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.1

Web server

Nginx

Database engine version

MySQL

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

Updated from a MINOR version (ex. 22.1 to 22.2)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

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

joshtrichards commented 2 months ago

Your report says you upgraded from a minor version, but this was a beta of 29.0.0.

Was this same Nextcloud Server using this SMB mount previously?

Was this a previously functioning 28.0.x Server that you upgraded to the beta? Or was it working in an earlier 29.0.0 beta?

Just trying to figure out when this broke for you.

oculos commented 2 months ago

Your report says you upgraded from a minor version, but this was a beta of 29.0.0.

Was this same Nextcloud Server using this SMB mount previously?

Was this a previously functioning 28.0.x Server that you upgraded to the beta? Or was it working in an earlier 29.0.0 beta?

Just trying to figure out when this broke for you.

I can't say precisely. It was for sure working on 28.0.X I noticed it wasn't working on 29.0.2. I upgraded to 29.0.4 to see if it was working again, but nope.

nextcloud-command commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.