Update from 4.4.10 to 5.0.4 Tipps - Manual is incomplete

I found out, how to update successfully from 4.4.10 to 5.0.4
The first time mautic wasn’t able to use as here reported:

The manual How to update Mautic 5.x — Mautic Documentation 0.1 documentation

is incomplete
After update in my case these 2 commands were necessary
chown -R www-data:www-data /var/www/html/mautic
chmod -R 755 /var/www/html/mautic

The full terminal (Ubuntu 22.04) looked so:
root@mautic01:/var/www/html/mautic# php bin/console mautic:update:find
Version 5.0.4 von Mautic ist zum Download bereit. Weitere Informationen finden Sie hier: Release Mautic Community 5.0.4 · mautic/mautic · GitHub.
To update, you can run ‘php bin/console mautic:update:apply’ from the command line.
root@mautic01:/var/www/html/mautic# php bin/console mautic:update:apply
Sind Sie sicher, dass Sie Mautic auf die neueste Version aktualisieren möchten? y
Step 7 [----->----------------------] Cache löschen

IMPORTANT: Run the same command again with --finish. For example ‘php bin/console mautic:update:apply --finish’
root@mautic01:/var/www/html/mautic# php bin/console mautic:update:apply --finish
Step 3 [============================] Erfolg! Sie verwenden nun Mautic 5.0.4.

root@mautic01:/var/www/html/mautic# chown -R www-data:www-data /var/www/html/mautic
root@mautic01:/var/www/html/mautic# chmod -R 755 /var/www/html/mautic

Now 5.0.4 works

I updated to php 8.1.27 and for the first look, it seems to work.

1 Like

Thats the reason: “root@mautic01” you do everything as “root” user. Thats why the files will be owned by root and your web server has no access on those files.

As I just mentioned in the other topic: Rights problem at installatioin, delete cache, and some strange things over night - #2 by dirk_s … its the problem how you set up your web server - it has nothing to do with Mautic itself.

Can you give me a short “Tutorial” what i have do to correct it? to have a right system?
Adding a new user? What do i have to do that Mautic works?

@stefan-franz actually preparing a system to be a safe and well running web server is nothing that can be achieved by a simple tutorial, let alone to maintain it and keeping it safe.

If you don’t have the experience and knowledge, I recommend using Plesk or similar management console. There the groups and users and security features are on a better level for public web hosting.

Although I have years of experience with Linux ans web servers I wouldn’t dare to maintain it myself - unless I was a administrator fulltime.

1 Like

My fault was, that at the very beginning i had set the cronjobs under root.

The right way is, to set the cronjobs under www-data
sudo crontab -u www-data -e

For my understanding, because of some infos from the forum here, was the root cronjob the problem with rights, so www-data’s rights have been revoked.

Now all worked fine.

1 Like