Issues with public links

Steps to reproduce

  1. Enable external storage and add a local path
  2. Add data to local storage
  3. Create public links and share It

Expected behaviour

Tell us what should happen

The user with the link could be able to download data

Actual behaviour

Tell us what happens instead

The browser starts downloading a “download.zip” file with a size of 10kb if try to download the entire folder. If try to download a single file, the browser show the message “impossible to download the file”

Server configuration

Operating system:
Ubuntu 24.04 on WSL2 under Windows 11
Web server:
apache2 -v
Server version: Apache/2.4.58 (Ubuntu)
Server built: 2024-07-17T18:55:23
Database:
mysql -v
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 244
Server version: 10.11.8-MariaDB-0ubuntu0.24.04.1 Ubuntu 24.04
PHP version:
$ php -v
PHP 7.4.33 (cli) (built: Sep 27 2024 04:14:06) ( NTS )
ownCloud version: (see ownCloud admin page)
10.15.0.2
Updated from an older ownCloud or fresh install:
Fresh
Where did you install ownCloud from:
Manual install
Signing status (ownCloud 9.0 and above):

No errors have been found.

The content of config/config.php:

https://www.dropbox.com/scl/fi/6bhqr0fq7vla9llwlog3b/config_report_20250217.json?rlkey=hrpo0ki2p9hcfyfcg81alb9yw&e=1&dl=0

List of activated apps:
Enabled:

  • activity:
    • Version: 2.7.2
    • Path: /var/www/owncloud/apps-external/activity
  • comments:
    • Version: 0.3.0
    • Path: /var/www/owncloud/apps/comments
  • configreport:
    • Version: 0.3.0
    • Path: /var/www/owncloud/apps/configreport
  • dav:
    • Version: 0.7.0
    • Path: /var/www/owncloud/apps/dav
  • encryption:
    • Version: 1.6.1
    • Path: /var/www/owncloud/apps/encryption
  • federatedfilesharing:
    • Version: 0.5.0
    • Path: /var/www/owncloud/apps/federatedfilesharing
  • federation:
    • Version: 0.1.0
    • Path: /var/www/owncloud/apps/federation
  • files:
    • Version: 1.6.0
    • Path: /var/www/owncloud/apps/files
  • files_clipboard:
    • Version: 1.0.3
    • Path: /var/www/owncloud/apps-external/files_clipboard
  • files_external:
    • Version: 0.9.0
    • Path: /var/www/owncloud/apps/files_external
  • files_external_dropbox:
    • Version: 2.0.2
    • Path: /var/www/owncloud/apps-external/files_external_dropbox
  • files_external_ftp:
    • Version: 0.2.1
    • Path: /var/www/owncloud/apps-external/files_external_ftp
  • files_mediaviewer:
    • Version: 1.0.5
    • Path: /var/www/owncloud/apps/files_mediaviewer
  • files_pdfviewer:
    • Version: 1.0.2
    • Path: /var/www/owncloud/apps-external/files_pdfviewer
  • files_sharing:
    • Version: 0.14.0
    • Path: /var/www/owncloud/apps/files_sharing
  • files_trashbin:
    • Version: 0.9.1
    • Path: /var/www/owncloud/apps/files_trashbin
  • files_versions:
    • Version: 1.3.0
    • Path: /var/www/owncloud/apps/files_versions
  • firstrunwizard:
    • Version: 1.3.0
    • Path: /var/www/owncloud/apps/firstrunwizard
  • market:
    • Version: 0.9.0
    • Path: /var/www/owncloud/apps/market
  • notifications:
    • Version: 0.6.0
    • Path: /var/www/owncloud/apps/notifications
  • provisioning_api:
    • Version: 0.5.0
    • Path: /var/www/owncloud/apps/provisioning_api
  • systemtags:
    • Version: 0.3.0
    • Path: /var/www/owncloud/apps/systemtags
  • updatenotification:
    • Version: 0.2.1
    • Path: /var/www/owncloud/apps/updatenotification
      Disabled:
  • external:
    • Path: /var/www/owncloud/apps/external
  • user_external:
    • Path: /var/www/owncloud/apps/user_external

Are you using external storage, if yes which one: local/smb/sftp/…
Local
Are you using encryption: yes/no
yes
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/…
NO

Client configuration

Browser:
Firefox
Operating system:
Windows 11

Logs

Web server error log

no webserver error log

ownCloud log (data/owncloud.log)

{“reqId”:“Z7L3xSO0LU1EMqOjExyZCQAAAAs”,“level”:3,“time”:“2025-02-17T08:48:05+00:00”,“remoteAddr”:“192.71.XXX.XXX”,“user”:“–”,“app”:“no app in context”,“method”:“GET”,“url”:“/owncloud/index.php/s/d8wV3okjQGZQR5e/download?path=%2F&files=48.tif&downloadStartSecret=7dtzwzgxy7r”,“message”:“Exception: {"Exception":"OC\\User\\NoUserException","Message":"Attempted to initialize mount points for null user and no user in session","Code":0,"Trace":"#0 \/var\/www\/owncloud\/lib\/private\/Encryption\/Keys\/Storage.php(383): OC\\Files\\Filesystem::initMountPoints()\n#1 \/var\/www\/owncloud\/lib\/private\/Encryption\/Keys\/Storage.php(283): OC\\Encryption\\Keys\\Storage->setupUserMounts()\n#2 \/var\/www\/owncloud\/lib\/private\/Encryption\/Keys\/Storage.php(93): OC\\Encryption\\Keys\\Storage->getFileKeyDir()\n#3 \/var\/www\/owncloud\/apps\/encryption\/lib\/KeyManager.php(404): OC\\Encryption\\Keys\\Storage->getFileKey()\n#4 \/var\/www\/owncloud\/apps\/encryption\/lib\/Crypto\/Encryption.php(498): OCA\\Encryption\\KeyManager->getFileKey()\n#5 \/var\/www\/owncloud\/lib\/private\/Files\/Storage\/Wrapper\/Encryption.php(365): OCA\\Encryption\\Crypto\\Encryption->isReadable()\n#6 \/var\/www\/owncloud\/lib\/private\/Files\/Storage\/Wrapper\/Wrapper.php(177): OC\\Files\\Storage\\Wrapper\\Encryption->isReadable()\n#7 \/var\/www\/owncloud\/lib\/private\/Files\/Storage\/Wrapper\/Wrapper.php(177): OC\\Files\\Storage\\Wrapper\\Wrapper->isReadable()\n#8 \/var\/www\/owncloud\/lib\/private\/Files\/View.php(1225): OC\\Files\\Storage\\Wrapper\\Wrapper->isReadable()\n#9 \/var\/www\/owncloud\/lib\/private\/Files\/View.php(535): OC\\Files\\View->basicOperation()\n#10 \/var\/www\/owncloud\/lib\/private\/Files\/Filesystem.php(841): OC\\Files\\View->isReadable()\n#11 \/var\/www\/owncloud\/lib\/private\/legacy\/files.php(282): OC\\Files\\Filesystem::isReadable()\n#12 \/var\/www\/owncloud\/lib\/private\/legacy\/files.php(124): OC_Files::getSingleFile()\n#13 \/var\/www\/owncloud\/apps\/files_sharing\/lib\/Controllers\/ShareController.php(557): OC_Files::get()\n#14 \/var\/www\/owncloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php(169): OCA\\Files_Sharing\\Controllers\\ShareController->downloadShare()\n#15 \/var\/www\/owncloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php(89): OC\\AppFramework\\Http\\Dispatcher->executeController()\n#16 \/var\/www\/owncloud\/lib\/private\/AppFramework\/App.php(99): OC\\AppFramework\\Http\\Dispatcher->dispatch()\n#17 \/var\/www\/owncloud\/lib\/public\/AppFramework\/App.php(131): OC\\AppFramework\\App::main()\n#18 \/var\/www\/owncloud\/core\/routes.php(145): OCP\\AppFramework\\App->dispatch()\n#19 \/var\/www\/owncloud\/lib\/private\/Route\/Router.php(344): OC\\Route\\Router->{closure}(*** sensitive parameters replaced ***)\n#20 \/var\/www\/owncloud\/lib\/kernel.php(925): OC\\Route\\Router->match()\n#21 \/var\/www\/owncloud\/index.php(32): OC::handleRequest()\n#22 {main}","File":"\/var\/www\/owncloud\/lib\/private\/Files\/Filesystem.php","Line":396}”}

Browser log

JQMIGRATE: Migrate is installed, version 1.4.0
shareconfigmodel.js?v=7ad8d2b568daf32f5084386b0715415d:24 Uncaught ReferenceError: oc_appconfig is not defined
at shareconfigmodel.js?v=7ad8d2b568daf32f5084386b0715415d:24:33
at shareconfigmodel.js?v=7ad8d2b568daf32f5084386b0715415d:212:3
(anonimo) @ shareconfigmodel.js?v=7ad8d2b568daf32f5084386b0715415d:24
(anonimo) @ shareconfigmodel.js?v=7ad8d2b568daf32f5084386b0715415d:212
files_mediaviewer_init.js?v=7ad8d2b568daf32f5084386b0715415d:1 Uncaught TypeError: Cannot read properties of undefined (reading ‘enabledPreviewProviders’)
at 473 (files_mediaviewer_init.js?v=7ad8d2b568daf32f5084386b0715415d:1:115)
at r (files_mediaviewer_init.js?v=7ad8d2b568daf32f5084386b0715415d:1:1585)
at files_mediaviewer_init.js?v=7ad8d2b568daf32f5084386b0715415d:1:1823
at files_mediaviewer_init.js?v=7ad8d2b568daf32f5084386b0715415d:1:2536
473 @ files_mediaviewer_init.js?v=7ad8d2b568daf32f5084386b0715415d:1
r @ files_mediaviewer_init.js?v=7ad8d2b568daf32f5084386b0715415d:1
(anonimo) @ files_mediaviewer_init.js?v=7ad8d2b568daf32f5084386b0715415d:1
(anonimo) @ files_mediaviewer_init.js?v=7ad8d2b568daf32f5084386b0715415d:1

The browser starts downloading a “download.zip” file with a size of 10kb if try to download the entire folder. If try to download a single file, the browser show the message “impossible to download the file”

Hello, why did you reposted my comment?

Thank you