For years, I was happy with running OC 10.11 using PHP 7.4 on a small website hosted by IONOS (formerly 1&1). IONOS kept prompting me to migrate to PHP 8.1, so I wanted to get this done as soon as possible.
Over the last few months, I was able to update all the other applications on my website so that they were ready for the PHP version flip, the last application to tackle was OC 10.11, which (as we all know, requires an update to NC 25.0).
After the usual preparation (backups of config, data and database; disabling 3rd part apps such as calendar), I followed the steps in https://docs.nextcloud.com/server/stable/admin_manual/maintenance/migrating_owncloud.html and https://docs.nextcloud.com/server/stable/admin_manual/maintenance/manual_upgrade.html.
I figured out how to run the steps “occ” - SSH to the server, using my SFTP information, and using php7.4-cli, and happily followed all the steps. The one thing that failed was the
chown -R www-data:www-data nextcloud
because of “permission denied”. All the directories and files are still owned by ftpusers. With the wrong ownership, all HTTPS requests to the instance returnd HTTP status code 403, so all the browser was showing was a blank page.
My solution to this was to
find nextcloud/ -type d -exec chmod 755 {} ;
find nextcloud/ -type f -exec chmod 644 {} ;
to give the r-x permission to www-data.
And, of course, change PHP to 8.1 once all the upgrade steps had been completed.
Let me know if you faced the same and this worked for you. Also let me know if you solved it a better way. Thanks.