Internal Server Error after update to v28

Nextcloud version (eg, 20.0.5): 28.0.2
Operating system and version (eg, Ubuntu 20.04): Ubuntu 22.04.3
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.52
PHP version (eg, 7.4): 8.1.2

I just updated from 27.1.2 to 27.1.6 to 28.0.2 using the CLI Updater (sudo -u www-data php /var/www/nextcloud/updater/updater.phar) (The web interface one always gives me problems)…
Updater flagged no errors or warnings.
My nextcloud interface was WORKING before I ran the updates.
Now when I try to load my dashboard, I get an Internal Server Error…
Unfortunately there’s a lot in there, but I THINK I see these errors repeating:

{"reqId":"gMUQBCj5bqjHFBMJKWhp","level":3,"time":"2024-02-16T01:45:49+00:00","remoteAddr":"192.168.1.1","user":"seanmcg182","app":"PHP","method":"GET","url":"/index.php/apps/dashboard/","message":"file_put_contents(/NextCloud2/appdata_ocs9vim4g30z/js/core/merged-template-prepend.js): Failed to open stream: Permission denied at /var/www/nextcloud/lib/private/Files/Storage/Local.php#335","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36","version":"28.0.2.5","data":{"app":"PHP"}}
{"reqId":"gMUQBCj5bqjHFBMJKWhp","level":3,"time":"2024-02-16T01:45:49+00:00","remoteAddr":"192.168.1.1","user":"seanmcg182","app":"index","method":"GET","url":"/index.php/apps/dashboard/","message":"file_put_contents failed","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36","version":"28.0.2.5","exception":{"Exception":"OCP\\Files\\GenericFileException","Message":"file_put_contents failed","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/Files/SimpleFS/SimpleFile.php","line":92,"function":"putContent","class":"OC\\Files\\Node\\File","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/JSCombiner.php","line":193,"function":"putContent","class":"OC\\Files\\SimpleFS\\SimpleFile","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/JSCombiner.php","line":96,"function":"cache","class":"OC\\Template\\JSCombiner","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/JSResourceLocator.php","line":150,"function":"process","class":"OC\\Template\\JSCombiner","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/JSResourceLocator.php","line":80,"function":"cacheAndAppendCombineJsonIfExist","class":"OC\\Template\\JSResourceLocator","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/ResourceLocator.php","line":73,"function":"doFind","class":"OC\\Template\\JSResourceLocator","type":"->"},{"file":"/var/www/nextcloud/lib/private/TemplateLayout.php","line":401,"function":"find","class":"OC\\Template\\ResourceLocator","type":"->"},{"file":"/var/www/nextcloud/lib/private/TemplateLayout.php","line":246,"function":"findJavascriptFiles","class":"OC\\TemplateLayout","type":"::"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":142,"function":"__construct","class":"OC\\TemplateLayout","type":"->"},{"file":"/var/www/nextcloud/lib/public/AppFramework/Http/TemplateResponse.php","line":211,"function":"fetchPage","class":"OC_Template","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":182,"function":"render","class":"OCP\\AppFramework\\Http\\TemplateResponse","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1069,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":39,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/Files/Node/File.php","Line":74,"message":"file_put_contents failed","exception":{},"CustomMessage":"file_put_contents failed"}}
{"reqId":"gMUQBCj5bqjHFBMJKWhp","level":3,"time":"2024-02-16T01:45:49+00:00","remoteAddr":"192.168.1.1","user":"seanmcg182","app":"PHP","method":"GET","url":"/index.php/apps/dashboard/","message":"file_put_contents(/NextCloud2/appdata_ocs9vim4g30z/js/core/merged-template-prepend.js): Failed to open stream: Permission denied at /var/www/nextcloud/lib/private/Files/Storage/Local.php#335","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36","version":"28.0.2.5","data":{"app":"PHP"}}
{"reqId":"gMUQBCj5bqjHFBMJKWhp","level":3,"time":"2024-02-16T01:45:49+00:00","remoteAddr":"192.168.1.1","user":"seanmcg182","app":"core","method":"GET","url":"/index.php/apps/dashboard/","message":"Exception thrown: OCP\\Files\\GenericFileException","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36","version":"28.0.2.5","exception":{"Exception":"OCP\\Files\\GenericFileException","Message":"file_put_contents failed","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/Files/SimpleFS/SimpleFile.php","line":92,"function":"putContent","class":"OC\\Files\\Node\\File","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/JSCombiner.php","line":193,"function":"putContent","class":"OC\\Files\\SimpleFS\\SimpleFile","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/JSCombiner.php","line":96,"function":"cache","class":"OC\\Template\\JSCombiner","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/JSResourceLocator.php","line":150,"function":"process","class":"OC\\Template\\JSCombiner","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/JSResourceLocator.php","line":80,"function":"cacheAndAppendCombineJsonIfExist","class":"OC\\Template\\JSResourceLocator","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/ResourceLocator.php","line":73,"function":"doFind","class":"OC\\Template\\JSResourceLocator","type":"->"},{"file":"/var/www/nextcloud/lib/private/TemplateLayout.php","line":401,"function":"find","class":"OC\\Template\\ResourceLocator","type":"->"},{"file":"/var/www/nextcloud/lib/private/TemplateLayout.php","line":246,"function":"findJavascriptFiles","class":"OC\\TemplateLayout","type":"::"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":142,"function":"__construct","class":"OC\\TemplateLayout","type":"->"},{"file":"/var/www/nextcloud/lib/public/AppFramework/Http/TemplateResponse.php","line":211,"function":"fetchPage","class":"OC_Template","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":182,"function":"render","class":"OCP\\AppFramework\\Http\\TemplateResponse","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1069,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":39,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/Files/Node/File.php","Line":74,"CustomMessage":"Exception thrown: OCP\\Files\\GenericFileException"}}
{"reqId":"gMUQBCj5bqjHFBMJKWhp","level":3,"time":"2024-02-16T01:45:49+00:00","remoteAddr":"192.168.1.1","user":"seanmcg182","app":"core","method":"GET","url":"/index.php/apps/dashboard/","message":"Exception thrown: OCP\\Files\\GenericFileException","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36","version":"28.0.2.5","exception":{"Exception":"OCP\\Files\\GenericFileException","Message":"file_put_contents failed","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/Files/SimpleFS/SimpleFile.php","line":92,"function":"putContent","class":"OC\\Files\\Node\\File","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/JSCombiner.php","line":193,"function":"putContent","class":"OC\\Files\\SimpleFS\\SimpleFile","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/JSCombiner.php","line":96,"function":"cache","class":"OC\\Template\\JSCombiner","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/JSResourceLocator.php","line":150,"function":"process","class":"OC\\Template\\JSCombiner","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/JSResourceLocator.php","line":80,"function":"cacheAndAppendCombineJsonIfExist","class":"OC\\Template\\JSResourceLocator","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/ResourceLocator.php","line":73,"function":"doFind","class":"OC\\Template\\JSResourceLocator","type":"->"},{"file":"/var/www/nextcloud/lib/private/TemplateLayout.php","line":401,"function":"find","class":"OC\\Template\\ResourceLocator","type":"->"},{"file":"/var/www/nextcloud/lib/private/TemplateLayout.php","line":246,"function":"findJavascriptFiles","class":"OC\\TemplateLayout","type":"::"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":142,"function":"__construct","class":"OC\\TemplateLayout","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/Base.php","line":132,"function":"fetchPage","class":"OC_Template","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":291,"function":"printPage","class":"OC\\Template\\Base","type":"->"},{"file":"/var/www/nextcloud/index.php","line":104,"function":"printExceptionErrorPage","class":"OC_Template","type":"::"}],"File":"/var/www/nextcloud/lib/private/Files/Node/File.php","Line":74,"CustomMessage":"Exception thrown: OCP\\Files\\GenericFileException"}}

Config.php is unchanged from before update:

<?php
$CONFIG = array (
  'instanceid' => 'xxxxx',
  'passwordsalt' => 'xxxxx',
  'secret' => 'xxxxx',
  'trusted_domains' =>
  array (
    0 => 'xxxxx',
    1 => 'xxxxx',
    2 => 'xxxxx',
    3 => 'xxxxx',
  ),
  'datadirectory' => '/NextCloud2',
  'dbtype' => 'mysql',
  'version' => '28.0.2.5',
  'overwrite.cli.url' => 'xxxxx',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'xxxxx',
  'dbpassword' => 'xxxxx',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'sean',
  'mail_domain' => 'xxxxx',
  'mail_smtphost' => 'xxxxx',
  'maintenance' => false,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'filelocking.enabled' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/run/redis/redis-server.sock',
    'port' => 0,
    'timeout' => 1.0,
  ),
  'default_phone_region' => 'NA',
  'enable_previews' => true,
  'preview_max_x' => '1024',
  'preview_max_y' => '1024',
  'preview_max_scale_factor' => 1,
  'enabledPreviewProviders' =>
  array (
    0 => 'OC\\Preview\\PNG',
    1 => 'OC\\Preview\\Image',
    2 => 'OC\\Preview\\TIFF',
    3 => 'OC\\Preview\\MP3',
    4 => 'OC\\Preview\\Movie',
    5 => 'OC\\Preview\\MKV',
    6 => 'OC\\Preview\\MP4',
    7 => 'OC\\Preview\\AVI',
    8 => 'OC\\Preview\\BMP',
    9 => 'OC\\Preview\\HEIC',
    10 => 'OC\\Preview\\GIF',
    11 => 'OC\\Preview\\JPEG',
    12 => 'OC\\Preview\\3GP',
    13 => 'OC\\Preview\\TXT',
    14 => 'OC\\Preview\\PDF',
  ),
  'theme' => '',
  'loglevel' => 2,
  'app_install_overwrite' =>
  array (
    0 => 'occweb',
  ),
'updater.release.channel' => 'stable',
  'mail_smtpport' => '465',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'xxxxx',
  'mail_smtppassword' => 'xxxxx',
  'mail_smtpsecure' => 'ssl',
  'jpeg_quality' => '60',
);

i ran the following on mine to get it running

sudo -u www-data php /var/www/nextcloud/cron.php
systemctl restart php8.1-fpm

What do the file permissions and ownership look for /NextCloud2/appdata_ocs9vim4g30z/js/core/merged-template-prepend.js and its parent folders? Anything odd?