Skip to content

[regression] symlinked apps and CSS - ResourceLocator can not find a web root #13556

@Daryes

Description

@Daryes

Seems to be the same problem as #5057 and others simlar.
Given the logs, it seems this was fixed in 12.x, but a change somewhere later removed the fix partially. I can go back to at least v13.0.1.1, up to 15.0.2.0

Currently, the apps work fine, while stored in a different dir symlinked back to the nextcloud main directory. But each time a user access them in the UI, an entry is generated in the log with an access error to a css file.

Steps to reproduce

  1. store the non built-in application in another directory, which is a symlink
  • nexcloud is under /server/websites/nextcloud/nextcloud-<version>/
  • external app are under /server/websites/nextcloud/conf/apps2/
  • create a symlink for nextcloud current version :
    ln -s /server/websites/nextcloud/nextcloud-<version> /server/websites/nextcloud/nextcloud
  • create the apps symlink :
    ln -s /server/websites/nextcloud/conf/apps2 /server/websites/nextcloud/nextcloud/apps2
  1. change the config.php with the app2 path information :
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/server/websites/nextcloud/nextcloud/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/server/websites/nextcloud/nextcloud/apps2',
      'url' => '/apps2',
      'writable' => true,
    ),
  ),
  1. use nextcloud, add some apps (like calendar, contacts, ...)
  2. click on the app bar at the top to show each of them, no need to do more. You can also see they appear correctly, and in fact they work correctly.
  3. check the log. Multiply the number of line by the number of external apps, and the number of users.

Expected behaviour

no warning in the logs

Actual behaviour

these entries in the log, one for each application under a symlink in the path, each time a user selects the application panel in his browser. Given the filename, I suppose this is automatically generated, as nothing like this exists physically.

ResourceLocator can not find a web root (root: /server/websites/nextcloud/conf/apps2/contacts, file: index.php/css/contacts/3d4b-bdca-contacts.css?v=96f9b18ad190af3746726337d98b2100, webRoot: , throw: true)

ResourceLocator can not find a web root (root: /server/websites/nextcloud/conf/apps2/calendar, file: index.php/css/calendar/029b-bdca-app.min.css?v=96f9b18ad190af3746726337d98b2100, webRoot: , throw: true)

ResourceLocator can not find a web root (root: /server/websites/nextcloud/conf/apps2/notes, file: index.php/css/notes/21f4-bdca-notes.css?v=96f9b18ad190af3746726337d98b2100, webRoot: , throw: true)

(... continue for any application under the apps2 directory)

Server configuration

Operating system: Ubuntu 18.04
Web server: Apache 2.4
Database: Mariadb 10.3
PHP version: PHP 7.2.14

Nextcloud version: 15.0.2.0

Updated from an older Nextcloud/ownCloud or fresh install: upgraded from 14.0.4
Where did you install Nextcloud from: : tar.gz from nextcloud.com

Metadata

Metadata

Assignees

No one assigned

    Labels

    1. to developAccepted and waiting to be taken care ofbug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions