Cannot login. OCP\AutoloadNotAllowedException: Autoload path not allowed: /usr/local/www/nextcloud/apps/files_external/lib/config.php
Interner Serverfehler
Der Server konnte die Anfrage nicht fertig stellen.
Sollte dies erneut auftreten, sende bitte die nachfolgenden technischen Einzelheiten an Deinen Server-Administrator.
Weitere Details können im Server-Protokoll gefunden werden.
Technische Details
Entfernte Adresse: 84.182.80.3
Anfragekennung: c8YFCw16p1Ew9if45OTu
Nextcloud version : 19.0.2.2
Operating system and version: FreeBSD 11.3-RELEASE (iocage jail on FreeNAS 11.3-RELEASE U4)
nginx: 1.18.0
PHP version: 7.4.9
The issue you are facing:
{"reqId":"3PZcMlP2gSAWp0nm23oU","level":3,"time":"2020-08-31T19:11:41+00:00","remoteAddr":"84.182.80.3","user":"admin","app":"index","method":"GET","url":"/index.php/csrftoken","message":{"Exception":"OCP\\AutoloadNotAllowedException","Message":"Autoload path not allowed: /usr/local/www/nextcloud/apps/files_external/lib/config.php","Code":0,"Trace":[{"file":"/usr/local/www/nextcloud/lib/autoloader.php","line":165,"function":"isValidPath","class":"OC\\Autoloader","type":"->","args":["/usr/local/www/nextcloud/apps/files_external/lib/config.php"]},{"function":"load","class":"OC\\Autoloader","type":"->","args":["OC_Mount_Config"]},{"file":"/usr/local/www/nextcloud/apps-pkg/files_external/appinfo/routes.php","line":33,"function":"spl_autoload_call","args":["OC_Mount_Config"]},{"file":"/usr/local/www/nextcloud/lib/private/Route/Router.php","line":380,"args":["/usr/local/www/nextcloud/apps-pkg/files_external/appinfo/routes.php"],"function":"include_once"},{"file":"/usr/local/www/nextcloud/lib/private/Route/Router.php","line":151,"function":"requireRouteFile","class":"OC\\Route\\Router","type":"->","args":["/usr/local/www/nextcloud/apps-pkg/files_external/appinfo/routes.php","files_external"]},{"file":"/usr/local/www/nextcloud/lib/private/Route/Router.php","line":268,"function":"loadRoutes","class":"OC\\Route\\Router","type":"->","args":[]},{"file":"/usr/local/www/nextcloud/lib/base.php","line":1012,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/csrftoken"]},{"file":"/usr/local/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/usr/local/www/nextcloud/lib/autoloader.php","Line":140,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0","version":"19.0.2.2"}
{"reqId":"B5sgGM2Kzmg5rfC02at4","level":1,"time":"2020-08-31T19:13:23+00:00","remoteAddr":"","user":"--","app":"cli","method":"","url":"--","message":"Memcache \\OC\\Memcache\\APCu not available for local cache","userAgent":"--","version":"19.0.2.2"}
{"reqId":"B5sgGM2Kzmg5rfC02at4","level":1,"time":"2020-08-31T19:13:24+00:00","remoteAddr":"","user":"--","app":"cli","method":"","url":"--","message":"Memcache \\OC\\Memcache\\APCu not available for distributed cache","userAgent":"--","version":"19.0.2.2"}
{"reqId":"B5sgGM2Kzmg5rfC02at4","level":3,"time":"2020-08-31T19:13:24+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":{"Exception":"OCP\\AutoloadNotAllowedException","Message":"Autoload path not allowed: /usr/local/www/nextcloud/apps/files_external/lib/config.php","Code":0,"Trace":[{"file":"/usr/local/www/nextcloud/lib/autoloader.php","line":165,"function":"isValidPath","class":"OC\\Autoloader","type":"->","args":["/usr/local/www/nextcloud/apps/files_external/lib/config.php"]},{"function":"load","class":"OC\\Autoloader","type":"->","args":["OC_Mount_Config"]},{"file":"/usr/local/www/nextcloud/apps/files_external/appinfo/app.php","line":38,"function":"spl_autoload_call","args":["OC_Mount_Config"]},{"file":"/usr/local/www/nextcloud/lib/private/legacy/OC_App.php","line":266,"args":["/usr/local/www/nextcloud/apps/files_external/appinfo/app.php"],"function":"require_once"},{"file":"/usr/local/www/nextcloud/lib/private/legacy/OC_App.php","line":155,"function":"requireAppFile","class":"OC_App","type":"::","args":["files_external"]},{"file":"/usr/local/www/nextcloud/lib/private/legacy/OC_App.php","line":128,"function":"loadApp","class":"OC_App","type":"::","args":["files_external"]},{"file":"/usr/local/www/nextcloud/lib/private/Console/Application.php","line":127,"function":"loadApps","class":"OC_App","type":"::","args":[]},{"file":"/usr/local/www/nextcloud/console.php","line":99,"function":"loadCommands","class":"OC\\Console\\Application","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/usr/local/www/nextcloud/occ","line":11,"args":["/usr/local/www/nextcloud/console.php"],"function":"require_once"}],"File":"/usr/local/www/nextcloud/lib/autoloader.php","Line":140,"CustomMessage":"--"},"userAgent":"--","version":"19.0.2.2"}
Is this the first time you’ve seen this error?: Y
Steps to replicate it:
- I upgraded from FreeNAS 11.2-RELEASE U8 to 11.3-RELEASE U4
The warden FreeBSD 11.0-RELEASE, migrated prior to the upgrade to an iocage jail. - During upgrade the nextcloud version of 17.0.9.0 was maybe detected as a plugin(?) and therefore was upgraded to 19.0.2.2. But it didn’t work.
- I upgraded the nc database to 18.0.8. manually and with occ and then let FreeNAS iocage upgrade the ‘plugin’ to 19.0.2.2
- I used the occ cmd for integrity checks, upgrades and to solve some issues
- I’m still get the errors listed above.
The output of your Nextcloud log in Admin > Logging:
can't login
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
root@nextcloud:/usr/local/www/nextcloud # cat config/config.php
<?php
$CONFIG = array (
'apps_paths' =>
array (
0 =>
array (
'path' => '/usr/local/www/nextcloud/apps',
'url' => '/apps',
'writable' => true,
),
1 =>
array (
'path' => '/usr/local/www/nextcloud/apps-pkg',
'url' => '/apps-pkg',
'writable' => true,
),
),
'logfile' => '/var/log/nextcloud/nextcloud.log',
'memcache.local' => '\\OC\\Memcache\\APCu',
'instanceid' => 'ocpgd7phg0fb',
'passwordsalt' => 'pppppppppppppppppppppppppp',
'secret' => 'ssssssssssssssssssssssssssssssss',
'trusted_domains' =>
array (
0 => '172.16.240.199',
1 => '172.16.240.26',
2 => 'nextcloud.floogy.myhost.eu',
3 => 'localhost',
4 => '172.16.240.4',
5 => '172.16.240.3',
6 => '172.16.240.16',
7 => 'floogy.myhost.bz',
8 => 'floogy.myhost.de',
),
'datadirectory' => '/usr/local/www/nextcloud/data',
'dbtype' => 'mysql',
'version' => '19.0.2.2',
'overwrite.cli.url' => 'https://172.16.240.199',
'overwriteprotocol' => 'https',
'dbname' => 'nextcloud',
'dbhost' => 'localhost:/tmp/mysql.sock',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => 'oc_admin',
'dbpassword' => 'xxxxxxxxxxxxxxxxxxxxxxxxxx',
'installed' => true,
'maintenance' => false,
'theme' => '',
'loglevel' => 0,
'mysql.utf8mb4' => true,
'updater.release.channel' => 'beta',
);
The output of your Apache/nginx/system log in /var/log/____
:
root@nextcloud:/usr/local/www/nextcloud # tail -n2 /var/log/nginx/{access,error}.log
==> /var/log/nginx/access.log <==
84.182.80.3 - nextcloud.floogy.myhost.eu [31/Aug/2020:21:26:41 +0200] "GET /index.php/csrftoken HTTP/2.0" 500 5601 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0" "-"rt=1.258 ut=1.257 cs=-
172.16.240.37 - 172.16.240.199 [31/Aug/2020:21:28:20 +0200] "GET /csrftoken HTTP/1.1" 404 146 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0" "-"rt=0.000 ut=- cs=-
==> /var/log/nginx/error.log <==
2020/08/31 21:16:19 [error] 95771#102370: *195 open() "/usr/local/etc/nginx/html/csrftoken" failed (2: No such file or directory), client: 172.16.240.37, server: _, request: "GET /csrftoken HTTP/1.1", host: "172.16.240.199"
2020/08/31 21:28:20 [error] 95771#102370: *198 open() "/usr/local/etc/nginx/html/csrftoken" failed (2: No such file or directory), client: 172.16.240.37, server: _, request: "GET /csrftoken HTTP/1.1", host: "172.16.240.199"
GET /index.php/csrftoken HTTP/2.0" 500
[error] 95771#102370: *198 open() “/usr/local/etc/nginx/html/csrftoken”
EDIT:
I’m able to login, after disabling files_external!
root@nextcloud:/usr/local/www/nextcloud # sudo -u www php occ app:disable files_external
The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see http://php.net/manual/en/book.pcntl.php
files_external disabled