NotPermittedException Error Prevents New Folder Creation

I have just finished manually installing the latest version of Nextcloud onto my file server PC running the Ubuntu Server 22.04.4 OS. It is a direct to metal installation of Nextcloud. In other words, it is not a SNAP or a Docker Portainer installation or a Script Installation. Lastly, I followed the install instructions outlined in the YouTube video below:

https://www.youtube.com/watch?v=r–pQtwQMv0

In short, my Nextcloud inbuilt Logging viewer shows a “NotPermittedException” error that makes no sense to me. Below is the logging error code detail and it shows a failure in creating various new folders within this path: /var/www/nextcloud/. The reason this error makes no sense to me is because the Nextcloud folder in this path /var/www/nextcloud/ was correctly configured using the chown command shown below:

ubuntu@myserver:/var/www$ sudo chown -R www-data:www-data /var/www/nextcloud

And the permission to the Nextcloud folder is set to 755 (rwxr-xr-x)

I would really appreciate any opinions on why my Nextcloud installation throws the errors shown below even though my Nextcloud folder is configured correctly. And even more, why does the rest of the Nextcloud installation install correctly into the /var/www/nextcloud/ folder without throwing any errors? It is only the folders shown below that throw installation errors.

Lastly, I referred to the link below for a fix and could not find one. Apparently, I am not the only one experiencing this error. Therefore, I would be very grateful if anybody in this forum can shed some light as to what is causing this error and how to fix it. Thank you for your time.

https://github.com/nextcloud/photos/issues/1498

Nextcloud Logging Error Detail:
NotPermittedException Could not create folder “/appdata_ocd5r7yccihs/theming/global”
/var/www/nextcloud/lib/private/Files/AppData/AppData.phpline 147
OC\Files\Node\Folder->newFolder()
/var/www/nextcloud/apps/theming/lib/ImageManager.phpline 367
OC\Files\AppData\AppData->newFolder()
/var/www/nextcloud/apps/theming/lib/ImageManager.phpline 101
OCA\Theming\ImageManager->getRootFolder()
/var/www/nextcloud/apps/theming/lib/Controller/IconController.phpline 176
OCA\Theming\ImageManager->getImage()
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.phpline 230
OCA\Theming\Controller\IconController->getTouchIcon()
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.phpline 137
OC\AppFramework\Http\Dispatcher->executeController()
/var/www/nextcloud/lib/private/AppFramework/App.phpline 184
OC\AppFramework\Http\Dispatcher->dispatch()
/var/www/nextcloud/lib/private/Route/Router.phpline 315
OC\AppFramework\App::main()
/var/www/nextcloud/lib/base.phpline 1069
OC\Route\Router->match()
/var/www/nextcloud/index.phpline 39
OC::handleRequest()