Nextcloud version (eg, 20.0.5): 27.1.5.1
Operating system and version (eg, Ubuntu 20.04): Docker production-fpm
Apache or nginx version (eg, Apache 2.4.25): ?
PHP version (eg, 7.4): ?
The issue you are facing:
After the update, the MariaDB container (10.5) ran crazy for about half an hour (disk writes on end), but finally it “died down”.
Since then, the Windows and Android clients as well as Firefox and Edge (yes, all caches cleared) do not show any files.
The files are on the servers storage just fine, all permissions unchanged (33:33 755) and within the container, I can access the data directory /var/www/data (where /html/config/config.php points to) without problems.
occ files:scan --all
yields an error in one of the groupfolders since it’s directory is symlinked into the data dir (other zfs dataset) but that was no problem beforehand.
occ groupfolders:list
shows the configured groupfolders but no size for the problematic groupfolder number 4 (see error log below).
Is this the first time you’ve seen this error? (Y/N): Y
Steps to replicate it:
- upgrade nextcloud:production-fpm from 27.1.3.2 to 27.1.5.1
- restart the docker stack and wait until MariaDB has done it’s db upgrade
- try to connect a nextcloud client or open den web interfac in Firefox or Edge: “files? which files? you never had any!”
The output of your Nextcloud log in Admin > Logging:
{"reqId":"bcOsdODizIo3l87c4BhT","level":3,"time":"2023-12-19T21:19:39+00:00","remoteAddr":"79.206.242.36","user":"georg","app":"index","method":"GET","url":"/apps/recommendations/api/recommendations","message":"Exception thrown: OCP\\Files\\NotPermittedException","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0","version":"27.1.5.1","exception":{"Exception":"OCP\\Files\\NotPermittedException","Message":"Could not create folder \"/__groupfolders/4\"","Code":0,"Trace":[{"function":"newFolder","class":"OC\\Files\\Node\\Folder","type":"->","args":["4"]},{"file":"/var/www/html/custom_apps/groupfolders/lib/Helper/LazyFolder.php","line":63,"function":"call_user_func_array","args":[[["OC\\Files\\Node\\Folder"],"newFolder"],["4"]]},{"file":"/var/www/html/custom_apps/groupfolders/lib/Helper/LazyFolder.php","line":143,"function":"__call","class":"OCA\\GroupFolders\\Helper\\LazyFolder","type":"->","args":["newFolder",["4"]]},{"file":"/var/www/html/custom_apps/groupfolders/lib/Mount/MountProvider.php","line":294,"function":"newFolder","class":"OCA\\GroupFolders\\Helper\\LazyFolder","type":"->","args":["4"]},{"file":"/var/www/html/custom_apps/groupfolders/lib/Mount/MountProvider.php","line":209,"function":"getFolder","class":"OCA\\GroupFolders\\Mount\\MountProvider","type":"->","args":[4]},{"file":"/var/www/html/custom_apps/groupfolders/lib/Mount/MountProvider.php","line":162,"function":"getMount","class":"OCA\\GroupFolders\\Mount\\MountProvider","type":"->","args":[4,"/NCadm/files/Medien",31,-3,null,["OC\\Files\\Storage\\StorageFactory"],true,["OC\\User\\User"],["OCA\\GroupFolders\\ACL\\ACLManager"],[[],[],[]]]},{"function":"OCA\\GroupFolders\\Mount\\{closure}","class":"OCA\\GroupFolders\\Mount\\MountProvider","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/groupfolders/lib/Mount/MountProvider.php","line":143,"function":"array_map","args":[["Closure"],["*** sensitive parameters replaced ***"]]},{"file":"/var/www/html/lib/private/Files/Config/MountProviderCollection.php","line":89,"function":"getMountsForUser","class":"OCA\\GroupFolders\\Mount\\MountProvider","type":"->","args":[["OC\\User\\User"],["OC\\Files\\Storage\\StorageFactory"]]},{"file":"/var/www/html/lib/private/Files/Config/MountProviderCollection.php","line":138,"function":"getMountsFromProvider","class":"OC\\Files\\Config\\MountProviderCollection","type":"->","args":[["OCA\\GroupFolders\\Mount\\MountProvider"],["OC\\User\\User"],["OC\\Files\\Storage\\StorageFactory"]]},{"file":"/var/www/html/lib/private/Files/SetupManager.php","line":215,"function":"addMountForUser","class":"OC\\Files\\Config\\MountProviderCollection","type":"->","args":[["OC\\User\\User"],["OC\\Files\\Mount\\Manager"],["Closure"]]},{"file":"/var/www/html/lib/private/Files/SetupManager.php","line":318,"function":"OC\\Files\\{closure}","class":"OC\\Files\\SetupManager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Files/SetupManager.php","line":214,"function":"setupForUserWith","class":"OC\\Files\\SetupManager","type":"->","args":[["OC\\User\\User"],["Closure"]]},{"file":"/var/www/html/lib/private/Files/SetupManager.php","line":498,"function":"setupForUser","class":"OC\\Files\\SetupManager","type":"->","args":[["OC\\User\\User"]]},{"file":"/var/www/html/lib/private/Files/Mount/Manager.php","line":231,"function":"setupForProvider","class":"OC\\Files\\SetupManager","type":"->","args":["/NCadm/files",["OC\\Files\\Mount\\LocalHomeMountProvider"]]},{"file":"/var/www/html/lib/private/Files/Node/Root.php","line":444,"function":"getMountsByMountProvider","class":"OC\\Files\\Mount\\Manager","type":"->","args":["/NCadm/files",["OC\\Files\\Mount\\LocalHomeMountProvider"]]},{"file":"/var/www/html/lib/private/Files/Node/LazyUserFolder.php","line":82,"function":"getByIdInPath","class":"OC\\Files\\Node\\Root","type":"->","args":[5774116,"/NCadm/files"]},{"file":"/var/www/html/lib/private/Share20/Share.php","line":191,"function":"getById","class":"OC\\Files\\Node\\LazyUserFolder","type":"->","args":[5774116]},{"file":"/var/www/html/apps/recommendations/lib/Service/RecentlySharedFilesSource.php","line":116,"function":"getNode","class":"OC\\Share20\\Share","type":"->","args":[]},{"function":"OCA\\Recommendations\\Service\\{closure}","class":"OCA\\Recommendations\\Service\\RecentlySharedFilesSource","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/recommendations/lib/Service/RecentlySharedFilesSource.php","line":112,"function":"array_map","args":[["Closure"],["*** sensitive parameters replaced ***"]]},{"file":"/var/www/html/apps/recommendations/lib/Service/RecommendationService.php","line":88,"function":"getMostRecentRecommendation","class":"OCA\\Recommendations\\Service\\RecentlySharedFilesSource","type":"->","args":[["OC\\User\\User"],7]},{"function":"OCA\\Recommendations\\Service\\{closure}","class":"OCA\\Recommendations\\Service\\RecommendationService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/recommendations/lib/Service/RecommendationService.php","line":87,"function":"array_reduce","args":[[["OCA\\Recommendations\\Service\\RecentlyCommentedFilesSource"],["OCA\\Recommendations\\Service\\RecentlyEditedFilesSource"],"*** sensitive parameters replaced ***"],["Closure"],[]]},{"file":"/var/www/html/apps/recommendations/lib/Controller/RecommendationController.php","line":64,"function":"getRecommendations","class":"OCA\\Recommendations\\Service\\RecommendationService","type":"->","args":[["OC\\User\\User"]]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"index","class":"OCA\\Recommendations\\Controller\\RecommendationController","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Recommendations\\Controller\\RecommendationController"],"index"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Recommendations\\Controller\\RecommendationController"],"index"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Recommendations\\Controller\\RecommendationController","index",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["recommendations.recommendation.index"]]},{"file":"/var/www/html/lib/base.php","line":1068,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/recommendations/api/recommendations"]},{"file":"/var/www/html/index.php","line":38,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/Files/Node/Folder.php","Line":162,"CustomMessage":"Exception thrown: OCP\\Files\\NotPermittedException"},"id":"658208eb700a5"}
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'memcache.local' => '\\OC\\Memcache\\APCu',
'apps_paths' =>
array (
0 =>
array (
'path' => '/var/www/html/apps',
'url' => '/apps',
'writable' => false,
),
1 =>
array (
'path' => '/var/www/html/custom_apps',
'url' => '/custom_apps',
'writable' => true,
),
),
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => 'redis',
'port' => 6379,
),
'instanceid' => '***',
'passwordsalt' => '***',
'secret' => '***',
'trusted_domains' =>
array (
0 => 'nextcloud',
1 => '***',
),
'datadirectory' => '/var/www/data',
'dbtype' => 'mysql',
'version' => '27.1.5.1',
'overwrite.cli.url' => 'https://**redacted**',
'dbname' => 'nextcloud',
'dbhost' => '172.20.0.3',
'dbport' => '',
'dbtableprefix' => '',
'mysql.utf8mb4' => true,
'dbuser' => 'nextcloud',
'dbpassword' => '***',
'installed' => true,
'mail_smtpmode' => 'smtp',
'mail_smtpsecure' => 'tls',
'mail_from_address' => '***',
'mail_domain' => '***',
'mail_smtpauthtype' => 'LOGIN',
'mail_smtpauth' => 1,
'mail_smtphost' => '***',
'mail_smtpport' => '587',
'mail_smtpname' => '***',
'mail_smtppassword' => '***',
'ldapIgnoreNamingRules' => false,
'default_language' => 'de',
'loglevel' => 0,
'defaultapp' => 'calendar,files',
'maintenance' => false,
'trusted_proxies' =>
array (
0 => '172.19.0.2',
),
'app_install_overwrite' =>
array (
0 => 'flowupload',
1 => 'tasks',
2 => 'twofactor_admin',
3 => 'ransomware_detection',
4 => 'keeweb',
5 => 'files_external_onedrive',
6 => 'occweb',
7 => 'apporder',
8 => 'contacts',
9 => 'external',
10 => 'ownbackup',
11 => 'qownnotesapi',
12 => 'quota_warning',
13 => 'spreed',
14 => 'uploaddetails',
15 => 'caniupdate',
16 => 'files_readmemd',
17 => 'ocdownloader',
18 => 'ocsms',
19 => 'files_inotify',
20 => 'breezedark',
21 => 'files_clipboard',
22 => 'w2g2',
23 => 'geoblocker',
24 => 'guests',
25 => 'activitylog',
26 => 'passman',
27 => 'drop_account',
28 => 'weather',
29 => 'side_menu',
30 => 'groupfolders',
31 => 'files_markdown',
32 => 'ransomware_protection',
33 => 'announcementcenter',
34 => 'nextbackup',
35 => 'duplicatefinder',
),
'theme' => '',
'share_folder' => '/Mit_mir_geteilt',
'skeletondirectory' => '',
'memory_limit' => '2G',
'max_execution_time' => '3600',
'max_input_time' => '180',
'default_phone_region' => 'DE',
'mail_sendmailmode' => 'smtp',
'data-fingerprint' => '88d57053ed86be48f181bcb0af4adef9',
);
The output of your Apache/nginx/system log in /var/log/____
:
not found
The interesting part is: a user without group folders can use the instance just fine. All users with access to (any) groupfolder (not just the problematic “4”) hit the wall…
Why does NC try to create the group folder “4”? It’s a symlink to another dataset! Even if it would be a normal directory, a create must fail too!
Were additional “sanity checks” implemented from 27.1.3 to 27.1.5? “Directory does not exist - create it!” Not very sane, if you as me…
ls -l
within the datadirectory
s __groupfolders
directory:
total 27K
drwxr-xr-x 6 www-data www-data 7 11.05.2023 22:05 ./
drwxrwx--- 34 www-data www-data 41 18.12.2023 22:12 ../
drwxr-xr-x 23 www-data www-data 75 24.10.2023 09:10 2/
drwxr-xr-x 27 www-data www-data 33 20.04.2023 17:04 3/
lrwxrwxrwx 1 www-data www-data 30 16.11.2023 17:11 4 -> /mir23/Medien/__groupfolders/4/
drwxr-xr-x 4 www-data www-data 5 01.07.2023 23:07 trash/
drwxr-xr-x 5 www-data www-data 6 11.05.2023 23:05 versions/
Again, this rather crude symlink layout worked before the upgrade.
Downgrading is no option since I didn’t bother to take a snapshot before this ‘minor’ upgrade (and just reverting the version number within the config.php doesn’t seem to be sufficient).
Any ideas?