How to correct update from 6.0.7

My system:
Ubuntu 24.04 server - Apache - Mautic 8.3.6 normal installation (no composer or anything special).

How is the correct way to update via ssh - normal standard server without any tweaks.

Mautic is here installed: /var/www/html/mautic

The update manual is here:

User on the system: root, www-data, user01

Can someone confirm that this is correct (or correct, give infos please) and that all rights will set correctly?

In short words:
Standing in the Mautic directory: /var/www/html/mautic
Command as user01 for the script but with user: “www-data” prefix, that the rights will set correctly for the update files.

user01@ubuntu-4gb-nbg1-2:/var/www/html/mautic$ sudo -u www-data php /var/www/html/mautic/bin/console mautic:update:find
Version 7.0.0 von Mautic ist zum Download bereit. Weitere Informationen finden Sie hier: https://github.com/mautic/mautic/releases/tag/7.0.0.
Geben Sie 'php bin/console mautic:update:apply' in die Kommandozeile ein, um das Update durchzuführen.
user01@ubuntu-4gb-nbg1-2:/var/www/html/mautic$ sudo -u www-data php /var/www/html/mautic/bin/console mautic:update:apply
...
user01@ubuntu-4gb-nbg1-2:/var/www/html/mautic$ sudo -u www-data php /var/www/html/mautic/bin/console mautic:update:apply --finish

Cache will be deleted by the script - is shown at the install process

Additional info (but normally not needed): If the rights are not correct:
sudo chown -R www-data:www-data /var/www/html/mautic
sudo chmod -R 755 /var/www/html/mautic

I don’t understand why you’re persisting in claiming that "composer” is a server component. It’s not.

Composer is an application-level dependency manager for the PHP programming language. It’s under the MIT license and can/should be bundled with any app/project that use it for managing app-side libs (and not the server-side PHP librairies).

ref:

And for the rest, the “tweaks” are literal bad practices. It’s abnormal and non-standard. It’s more of ugly hacks.

I’ll break it down once again:

This is wrong:
User on the system: root, www-data, user01

You should have a dedicated user for the web app. And that user shouldn’t have the sudo power. (www-data ain’t the proper one - you’re openly and willingly putting your server at risk)

This is also wrong:
sudo chmod -R 755 /var/www/html/mautic

Files are 644 and directories are 755 (it’s universal on all web app, on any Linux distro)

Using the proper user right right away when managing your web app will prevent/avoid the chmod

Quick tip on how you may “fix” the permissions: Use the “find” tool.

i.e.
Files permissions:
find /var/www/html/mautic -type f | xargs chmod 0644

Directory permissions:
find /var/www/html/mautic -type d | xargs chmod 0755

Good luck!