nextcloud / server

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

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

Closed aleadco closed 1 year ago

aleadco commented 4 years ago

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

q-wertz commented 3 years ago

Same on NC 20.0.8

szaimen commented 3 years ago

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

Aquariu commented 2 years ago

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

Kind regards, Olivier

aleadco commented 2 years ago

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.

ghost commented 2 years 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.

Terrox commented 2 years ago

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

nextcloud-command commented 2 years 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.

q-wertz commented 2 years ago

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
nextcloud-command commented 2 years 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.

q-wertz commented 2 years ago

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"}
gedeon007 commented 2 years ago

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?

nextcloud-command commented 2 years 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.

q-wertz commented 2 years ago

Still happening on 24.0.3

Flunkyball commented 1 year ago

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:

Not working:

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
szaimen commented 1 year ago

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+

q-wertz commented 1 year ago

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

szaimen commented 1 year ago

Thanks for verifying!

sachz19 commented 1 year ago

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.

Terrox commented 1 year ago

I still have this error on 25.0.3

szaimen commented 1 year ago

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

q-wertz commented 1 year ago

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

Sorry, was too early. Also still have it

sachz19 commented 1 year ago

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: @.***>

pascalbrax commented 1 year ago

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

pascalbrax commented 1 year ago

Thanks for verifying!

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

housuton commented 1 year ago

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.

mic05 commented 1 year ago

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

szaimen commented 1 year ago

Please open new one with up-to-date information

deanrbennett commented 9 months ago

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.

kylespencer commented 8 months ago

Also experiencing this on 27.1.5

jonas740 commented 6 months ago

Have the same issue on 28.0.2 after adding sftp storage

joshtrichards commented 6 months ago

@deanrbennett / @kylespencer / @jonas740 - As noted, this issue is closed. So either open a new issue with your details or, actually, I'll re-open this one for the time being: #38940