server icon indicating copy to clipboard operation
server copied to clipboard

[19.0.2] Can't get app storage, app files_external, user not logged in

Open aleadco opened this issue 4 years ago • 12 comments

Steps to reproduce

  1. Add an external storage system using SFTP
  2. Create a folder in this storage and share by public link
  3. Add upload only permission and hide download button

Expected behaviour

Apparently it is shared correctly

Actual behaviour

The following error appears in the logs

[core] Error: Can't get app storage, app files_external, user not logged in

GET /s/YecebcJqjCRAtCC
from 10.8.7.10 at 2020-09-02T01:39:40-04:00

I run the same procedure from a local folder and it doesn't happen

Server configuration

Operating system: Ubuntu 18.04

Web server: Apache with nginx reverse proxy Database: mysql PHP version: 7.4.9 Nextcloud version: (see Nextcloud admin page) 19.0.2 Updated from an older Nextcloud/ownCloud or fresh install: No Where did you install Nextcloud from: doc official

aleadco avatar Sep 02 '20 06:09 aleadco

Same on NC 20.0.8

q-wertz avatar Apr 27 '21 22:04 q-wertz

Is this Issue still valid in NC21.0.3? If not, please close this issue. Thanks! :)

szaimen avatar Jul 02 '21 15:07 szaimen

Dear all,

I still have that same issue running 22.2.5 in that same configuration (drop file only link, no download button). php7.4 MariaDB Nginx

Several error messages pop up

  • when accessing the public share link:

Can't get app storage, app files_external, user not logged in

  • When uploading a file with that public share link

Can't get app storage, app files_external, user not logged in Trying to access array offset on value of type bool at /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SFTP.php#334 Trying to access array offset on value of type bool at /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SFTP.php#330 Trying to access array offset on value of type bool at /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SFTP.php#334 Trying to access array offset on value of type bool at /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SFTP.php#330

Kind regards, Olivier

Aquariu avatar Feb 16 '22 22:02 Aquariu

Is this Issue still valid in NC21.0.3? If not, please close this issue. Thanks! :)

The problem persists, even in version 23.0.2.

aleadco avatar Feb 18 '22 13:02 aleadco

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.

ghost avatar Mar 20 '22 13:03 ghost

I get this running "php occ files:scan --all" I used to have the External Files Gdrive app installed, might be related.

Terrox avatar Mar 24 '22 19:03 Terrox

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.

nextcloud-command avatar May 17 '22 00:05 nextcloud-command

Few days ago (but now only happens rarely):

Raw log entry:

{"reqId":"jOVZZQFQjxG5aRqjIjei","level":3,"time":"2022-05-11T21:00:03+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Can't get app storage, app files_external, user not logged in","userAgent":"--","version":"23.0.4.1","id":"6283527da6e35"}

Formatted:

[core] Error: Can't get app storage, app files_external, user not logged in

at 2022-05-11T21:00:03+00:00

q-wertz avatar May 17 '22 07:05 q-wertz

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.

nextcloud-command avatar Jun 18 '22 00:06 nextcloud-command

Still happening

{"reqId":"fXUl9RWk72fRE7r53NaJ","level":3,"time":"2022-06-18T09:15:02+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Can't get app storage, app files_external, user not logged in","userAgent":"--","version":"23.0.5.1","id":"62ad9a2cb4945"}
{"reqId":"fXUl9RWk72fRE7r53NaJ","level":3,"time":"2022-06-18T09:15:02+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Can't get app storage, app files_external, user not logged in","userAgent":"--","version":"23.0.5.1","id":"62ad9a2cb4954"}
{"reqId":"fXUl9RWk72fRE7r53NaJ","level":3,"time":"2022-06-18T09:15:02+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Can't get app storage, app files_external, user not logged in","userAgent":"--","version":"23.0.5.1","id":"62ad9a2cb495f"}
{"reqId":"fXUl9RWk72fRE7r53NaJ","level":3,"time":"2022-06-18T09:15:02+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Can't get app storage, app files_external, user not logged in","userAgent":"--","version":"23.0.5.1","id":"62ad9a2cb4969"}

q-wertz avatar Jun 18 '22 09:06 q-wertz

Same issue here. ownCloud 10.10.0 (stable) - 10.10.0.3

Seems like anonymous users / no users / null users would not have permission to use files_external.

{"reqId":"Yr9QkYD9hiI1Dw92ojvqVAAACAI","level":3,"time":"2022-07-01T19:52:50+00:00","remoteAddr":"","user":"--","app":"core","method":"PUT","url":"/upl/public.php/webdav/test.txt","message":"Can't get app storage, app files_external, user not logged in"} {"reqId":"Yr9QkYD9hiI1Dw92ojvqVAAACAI","level":3,"time":"2022-07-01T19:52:55+00:00","remoteAddr":"","user":"--","app":"core","method":"PUT","url":"/upl/public.php/webdav/test.txt","message":"Can't get app storage, app files_external, user not logged in"}

(remoteAddr field is deleted for privacy reasons)

But it is interesting as the anonymous user is able to open the public share link, pointing to the external share.

BTW when configuring the SFTP external share there is an "Available for" field. The default string in the textbox is "All users. Type to select user or group." I tried to add Anonymous, Null user, No user, but the inline search does not offer it and I guess Anonymous is not part of the term "All users".

Does anyone have an idea how to grant the necessary rights for Anonymous users to upload files using files_external app?

gedeon007 avatar Jul 03 '22 19:07 gedeon007

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.

nextcloud-command avatar Aug 03 '22 00:08 nextcloud-command

Still happening on 24.0.3

q-wertz avatar Aug 16 '22 11:08 q-wertz

Same issue in 24.0.6

All users have their private SFTP share mounted to "/" in Nextcloud. Users credentials are stored in the database. (Same issue occurs with SMB instead of SFTP as well)

If user A shares an open office file with user B and user B tries to edit it with collabora the reported error is logged:

[core] Fehler: Can't get app storage, app files_external, user not logged in

GET /index.php/apps/richdocuments/wopi/files/145954_ocwiq5m91m2n/contents?access_token=R8SyNMmid3RY1AwTyEvemQu1PoMWVXKp&access_token_ttl=0
from 172.17.0.2 at 2022-11-01T13:30:13+00:00  

Working:

  • Editing the shared file within the Android app using integrated collabora
  • Editing the file shared via a public share link
  • Reading of the file on all interfaces

Not working:

  • Editing the file opened from webinterface of user B.

In order to rule out issues with collabora I tried the same with just a simple text file. -> Exactly the same result. When edited through the webinterface of user B a server timeout is shown and the following log is created:


[index] Fehler: Exception: Argument 2 passed to OCA\Files_Versions\Command\Expire::__construct() must be of the type string, null given, called in /var/www/html/apps/files_versions/lib/Storage.php on line 743 in file '/var/www/html/apps/files_versions/lib/Command/Expire.php' line 46 at <<closure>>

0. /var/www/html/lib/private/AppFramework/App.php line 172
   OC\AppFramework\Http\Dispatcher->dispatch()
1. /var/www/html/lib/private/Route/Router.php line 298
   OC\AppFramework\App::main()
2. /var/www/html/lib/base.php line 1030
   OC\Route\Router->match()
3. /var/www/html/index.php line 36
   OC::handleRequest()

POST /apps/text/session/sync
from 10.0.1.37 by user B at 2022-11-01T13:28:13+00:00

Flunkyball avatar Nov 01 '22 13:11 Flunkyball

Hi, please update to 24.0.9 or better 25.0.3 and report back if it fixes the issue. Thank you!

My goal is to add a label like e.g. 25-feedback to this ticket of an up-to-date major Nextcloud version where the bug could be reproduced. However this is not going to work without your help. So thanks for all your effort!

If you don't manage to reproduce the issue in time and the issue gets closed but you can reproduce the issue afterwards, feel free to create a new bug report with up-to-date information by following this link: https://github.com/nextcloud/server/issues/new?assignees=&labels=bug%2C0.+Needs+triage&template=BUG_REPORT.yml&title=%5BBug%5D%3A+

szaimen avatar Jan 23 '23 10:01 szaimen

Can't find it in the last logs (I'm on 25.0.3 now)

q-wertz avatar Jan 23 '23 15:01 q-wertz

Thanks for verifying!

szaimen avatar Jan 23 '23 15:01 szaimen

I got this error for the first time after enabling redis for memcache and file locking i'm on NC 25.0.3

This happened during the files:scan --all command. From what i can tell the access works (it is still scanning the folders and files, just gave the error twice in the same second. I suspect it might timeout when reading a file and spawn the error from what I can tell.

sachz19 avatar Feb 13 '23 19:02 sachz19

I still have this error on 25.0.3

Terrox avatar Feb 23 '23 20:02 Terrox

Hi, please open a new issue then with up-to-date information. Thanks!

szaimen avatar Feb 24 '23 07:02 szaimen

Can't find it in the last logs (I'm on 25.0.3 now)

Sorry, was too early. Also still have it

q-wertz avatar Feb 26 '23 21:02 q-wertz

I’ve noticed that it’s a lot more stable when splitting my single 2tb sftp target into multiple targets between 400-500gb per target.Occ files:scan command is now more accurate and doesn’t skip files or shows a difference of about 200gb compared to actual 2tb of data.My advice, split up to multiple targets for a more stable experience.The nextcloud client is now also a lot more stable and is actually useable for me.On 26 Feb 2023, at 22:41, q-wertz @.***> wrote:

Can't find it in the last logs (I'm on 25.0.3 now)

Sorry, was too early. Also still have it

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

sachz19 avatar Feb 26 '23 22:02 sachz19

Same issue here, not sure about what's causing it because the log doesn't say.

pascalbrax avatar Apr 12 '23 08:04 pascalbrax

Thanks for verifying!

@szaimen can you please verify if it should stay closed or re-open it?

pascalbrax avatar Apr 12 '23 08:04 pascalbrax

I have this same error on 25.0.5. I have tried SFTP storage with username and password auth and RSA private key but the error occurs with both.

housuton avatar Apr 14 '23 05:04 housuton

I have the same issue with NC 26. @szaimen Is there a new issue or can this be reopened?

mic05 avatar May 04 '23 22:05 mic05

Please open new one with up-to-date information

szaimen avatar May 04 '23 22:05 szaimen

Still happening on 27.1.5. SFTP mount for local user. Happens at intervals of 15 and 20 minutes, whether I'm logged into the web gui or not.

deanrbennett avatar Dec 17 '23 15:12 deanrbennett

Also experiencing this on 27.1.5

kylespencer avatar Jan 02 '24 00:01 kylespencer

Have the same issue on 28.0.2 after adding sftp storage

jonas740 avatar Feb 28 '24 20:02 jonas740