Your software
My Mautic version is: 7.0.0
My PHP version is: 8.3.6
My Database type and version is:10.11.13
I installed Mautic via: Zip - Updated via php bin/console mautic:update:find and following commands.
Your problem
My problem is: Mautic display error in the Mail Area
Note: I have a multi user Mautic. Admin, user1, user2
I tested that yesterday as user1 - i’m sure it’s right problem in the user Management. 6.0.7 works fine.
I always updated over the php bin/console mautic:update:find from 4.4 to 5 to 6.0.7 without any tweaks. ubuntu 24.04 server at hetztner.com - nothing special on my side.
These errors are showing in the log: Don’t know which log you need - but i had to go back to 6.0.7 because of the error above. Try out multi user Instance and you see the error. 100%
Steps I have tried to fix the problem: Nothing - Don’t know how. Went back to 6.0.7 because of this huge bug.
Here is my bug created on Github - Closed…hmmm….
When I encounter Mautic errors during upgrades, I connect Windsurf AI IDE via SSH and use Claude Opus 4.5, and it always fixes them in a few minutes.
Often, these issues occur because the cache isn’t properly cleared before and after the upgrade. Sometimes you need to manually delete everything from the cache folder.
@stefan-franz as I mentioned on GitHub, if you wish people to help you must provide your server logs. We cannot help troubleshoot without the actual logs that tell you what the problem is.
To get your log files, check the /var/logs folder in your Mautic folder.
You’ll see files by date.
Reproduce the problem, go to the log file, read the logs to see what is causing the error. It could well be a third-party plugin, for example. The log files should tell you the info about what’s causing the error.
Be sure to redact any sensitive information before sharing them in the forums. Thanks!
updatet again from 6.0.7 to 7.0.0
Switching to the e-Mail section brings the error above - her is the log file:
mautic_prod-2026-01-28.php
[2026-01-28T10:50:07.924533+00:00] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Filesystem\Exception\IOException: "Cannot rename "/tmp/url_matching_routes.phprfPP5K" to "/var/www/html/mautic/var/cache/prod/url_matching_routes.php": rename(/tmp/url_matching_routes.phprfPP5K,/var/www/html/mautic/var/cache/prod/url_matching_routes.php): Permission denied" at /var/www/html/mautic/vendor/symfony/filesystem/Filesystem.php line 304 {"exception":"[object] (Symfony\\Component\\Filesystem\\Exception\\IOException(code: 0): Cannot rename \"/tmp/url_matching_routes.phprfPP5K\" to \"/var/www/html/mautic/var/cache/prod/url_matching_routes.php\": rename(/tmp/url_matching_routes.phprfPP5K,/var/www/html/mautic/var/cache/prod/url_matching_routes.php): Permission denied at /var/www/html/mautic/vendor/symfony/filesystem/Filesystem.php:304)"} {"hostname":"ubuntu-4gb-nbg1-2","pid":218647}
[2026-01-28T10:50:08.010861+00:00] mautic.CRITICAL: Exception thrown when handling an exception (Twig\Error\RuntimeError: An exception has been thrown during the rendering of a template ("Cannot rename "/tmp/url_generating_routes.php1UfNej" to "/var/www/html/mautic/var/cache/prod/url_generating_routes.php": rename(/tmp/url_generating_routes.php1UfNej,/var/www/html/mautic/var/cache/prod/url_generating_routes.php): Permission denied") in "@MauticCore/Default/script.html.twig" at line 7. at /var/www/html/mautic/app/bundles/CoreBundle/Resources/views/Default/script.html.twig line 7) {"exception":"[object] (Twig\\Error\\RuntimeError(code: 0): An exception has been thrown during the rendering of a template (\"Cannot rename \"/tmp/url_generating_routes.php1UfNej\" to \"/var/www/html/mautic/var/cache/prod/url_generating_routes.php\": rename(/tmp/url_generating_routes.php1UfNej,/var/www/html/mautic/var/cache/prod/url_generating_routes.php): Permission denied\") in \"@MauticCore/Default/script.html.twig\" at line 7. at /var/www/html/mautic/app/bundles/CoreBundle/Resources/views/Default/script.html.twig:7)\n[previous exception] [object] (Symfony\\Component\\Filesystem\\Exception\\IOException(code: 0): Cannot rename \"/tmp/url_generating_routes.php1UfNej\" to \"/var/www/html/mautic/var/cache/prod/url_generating_routes.php\": rename(/tmp/url_generating_routes.php1UfNej,/var/www/html/mautic/var/cache/prod/url_generating_routes.php): Permission denied at /var/www/html/mautic/vendor/symfony/filesystem/Filesystem.php:304)"} {"hostname":"ubuntu-4gb-nbg1-2","pid":218647}
[2026-01-28T10:50:08.019409+00:00] mautic.ERROR: Twig\Error\RuntimeError: An exception has been thrown during the rendering of a template ("Cannot rename "/tmp/url_generating_routes.php1UfNej" to "/var/www/html/mautic/var/cache/prod/url_generating_routes.php": rename(/tmp/url_generating_routes.php1UfNej,/var/www/html/mautic/var/cache/prod/url_generating_routes.php): Permission denied") in "@MauticCore/Default/script.html.twig" at line 7. - in file /var/www/html/mautic/app/bundles/CoreBundle/Resources/views/Default/script.html.twig - at line 7 [] {"hostname":"ubuntu-4gb-nbg1-2","pid":218647}
[2026-01-28T10:50:20.419277+00:00] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Filesystem\Exception\IOException: "Cannot rename "/tmp/url_matching_routes.phpGx84Ey" to "/var/www/html/mautic/var/cache/prod/url_matching_routes.php": rename(/tmp/url_matching_routes.phpGx84Ey,/var/www/html/mautic/var/cache/prod/url_matching_routes.php): Permission denied" at /var/www/html/mautic/vendor/symfony/filesystem/Filesystem.php line 304 {"exception":"[object] (Symfony\\Component\\Filesystem\\Exception\\IOException(code: 0): Cannot rename \"/tmp/url_matching_routes.phpGx84Ey\" to \"/var/www/html/mautic/var/cache/prod/url_matching_routes.php\": rename(/tmp/url_matching_routes.phpGx84Ey,/var/www/html/mautic/var/cache/prod/url_matching_routes.php): Permission denied at /var/www/html/mautic/vendor/symfony/filesystem/Filesystem.php:304)"} {"hostname":"ubuntu-4gb-nbg1-2","pid":266307}
[2026-01-28T10:50:20.482080+00:00] mautic.CRITICAL: Exception thrown when handling an exception (Twig\Error\RuntimeError: An exception has been thrown during the rendering of a template ("Cannot rename "/tmp/url_generating_routes.phpPULCFx" to "/var/www/html/mautic/var/cache/prod/url_generating_routes.php": rename(/tmp/url_generating_routes.phpPULCFx,/var/www/html/mautic/var/cache/prod/url_generating_routes.php): Permission denied") in "@MauticCore/Default/script.html.twig" at line 7. at /var/www/html/mautic/app/bundles/CoreBundle/Resources/views/Default/script.html.twig line 7) {"exception":"[object] (Twig\\Error\\RuntimeError(code: 0): An exception has been thrown during the rendering of a template (\"Cannot rename \"/tmp/url_generating_routes.phpPULCFx\" to \"/var/www/html/mautic/var/cache/prod/url_generating_routes.php\": rename(/tmp/url_generating_routes.phpPULCFx,/var/www/html/mautic/var/cache/prod/url_generating_routes.php): Permission denied\") in \"@MauticCore/Default/script.html.twig\" at line 7. at /var/www/html/mautic/app/bundles/CoreBundle/Resources/views/Default/script.html.twig:7)\n[previous exception] [object] (Symfony\\Component\\Filesystem\\Exception\\IOException(code: 0): Cannot rename \"/tmp/url_generating_routes.phpPULCFx\" to \"/var/www/html/mautic/var/cache/prod/url_generating_routes.php\": rename(/tmp/url_generating_routes.phpPULCFx,/var/www/html/mautic/var/cache/prod/url_generating_routes.php): Permission denied at /var/www/html/mautic/vendor/symfony/filesystem/Filesystem.php:304)"} {"hostname":"ubuntu-4gb-nbg1-2","pid":266307}
[2026-01-28T10:50:20.526184+00:00] mautic.ERROR: Twig\Error\RuntimeError: An exception has been thrown during the rendering of a template ("Cannot rename "/tmp/url_generating_routes.phpPULCFx" to "/var/www/html/mautic/var/cache/prod/url_generating_routes.php": rename(/tmp/url_generating_routes.phpPULCFx,/var/www/html/mautic/var/cache/prod/url_generating_routes.php): Permission denied") in "@MauticCore/Default/script.html.twig" at line 7. - in file /var/www/html/mautic/app/bundles/CoreBundle/Resources/views/Default/script.html.twig - at line 7 [] {"hostname":"ubuntu-4gb-nbg1-2","pid":266307}
[2026-01-28T10:51:03.664405+00:00] mautic.CRITICAL: Uncaught PHP Exception Twig\Error\LoaderError: "Unable to find template "@MauticCore/Assets/pictograms/pilot-test.svg" (looked into: /var/www/html/mautic/app/bundles/CoreBundle, /var/www/html/mautic/app/bundles/CoreBundle/Resources/views) in "@MauticCore/Components/pictogram.html.twig" at line 4." at /var/www/html/mautic/app/bundles/CoreBundle/Resources/views/Components/pictogram.html.twig line 4 {"exception":"[object] (Twig\\Error\\LoaderError(code: 0): Unable to find template \"@MauticCore/Assets/pictograms/pilot-test.svg\" (looked into: /var/www/html/mautic/app/bundles/CoreBundle, /var/www/html/mautic/app/bundles/CoreBundle/Resources/views) in \"@MauticCore/Components/pictogram.html.twig\" at line 4. at /var/www/html/mautic/app/bundles/CoreBundle/Resources/views/Components/pictogram.html.twig:4)"} {"hostname":"ubuntu-4gb-nbg1-2","pid":266307}
I’ve just sent today a newsletter out. Can try it out in about 1 Week.
But: The install php command did this. I saw it in the SSH terminal. It’s a own step of the install routine. Doesn’t this work?
Btw:
What command do you prefer / what is the right for deleting the cache:
php /var/www/html/mautic/bin/console cache:clear
root@mautic01:/var/www/html/mautic# rm -rf var/cache/*
chatGPT gave me this:
find /var/www/html/mautic/var/cache/ -mindepth 1 -delete
updatet again from 6.0.7 to 7.0.0
deleted the cache manually
Switching to the e-Mail section brings the error 500 as above displayed - her is the log file:
mautic_prod-2026-01-30.php
[2026-01-30T06:20:04.713899+00:00] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Filesystem\Exception\IOException: "Cannot rename "/tmp/url_matching_routes.phpK1Bd9I" to "/var/www/html/mautic/var/cache/prod/url_matching_routes.php": rename(/tmp/url_matching_routes.phpK1Bd9I,/var/www/html/mautic/var/cache/prod/url_matching_routes.php): Permission denied" at /var/www/html/mautic/vendor/symfony/filesystem/Filesystem.php line 304 {"exception":"[object] (Symfony\\Component\\Filesystem\\Exception\\IOException(code: 0): Cannot rename \"/tmp/url_matching_routes.phpK1Bd9I\" to \"/var/www/html/mautic/var/cache/prod/url_matching_routes.php\": rename(/tmp/url_matching_routes.phpK1Bd9I,/var/www/html/mautic/var/cache/prod/url_matching_routes.php): Permission denied at /var/www/html/mautic/vendor/symfony/filesystem/Filesystem.php:304)"} {"hostname":"ubuntu-4gb-nbg1-2","pid":551332}
[2026-01-30T06:20:04.789697+00:00] mautic.CRITICAL: Exception thrown when handling an exception (Twig\Error\RuntimeError: An exception has been thrown during the rendering of a template ("Cannot rename "/tmp/url_generating_routes.phpXtKUU5" to "/var/www/html/mautic/var/cache/prod/url_generating_routes.php": rename(/tmp/url_generating_routes.phpXtKUU5,/var/www/html/mautic/var/cache/prod/url_generating_routes.php): Permission denied") in "@MauticCore/Default/script.html.twig" at line 7. at /var/www/html/mautic/app/bundles/CoreBundle/Resources/views/Default/script.html.twig line 7) {"exception":"[object] (Twig\\Error\\RuntimeError(code: 0): An exception has been thrown during the rendering of a template (\"Cannot rename \"/tmp/url_generating_routes.phpXtKUU5\" to \"/var/www/html/mautic/var/cache/prod/url_generating_routes.php\": rename(/tmp/url_generating_routes.phpXtKUU5,/var/www/html/mautic/var/cache/prod/url_generating_routes.php): Permission denied\") in \"@MauticCore/Default/script.html.twig\" at line 7. at /var/www/html/mautic/app/bundles/CoreBundle/Resources/views/Default/script.html.twig:7)\n[previous exception] [object] (Symfony\\Component\\Filesystem\\Exception\\IOException(code: 0): Cannot rename \"/tmp/url_generating_routes.phpXtKUU5\" to \"/var/www/html/mautic/var/cache/prod/url_generating_routes.php\": rename(/tmp/url_generating_routes.phpXtKUU5,/var/www/html/mautic/var/cache/prod/url_generating_routes.php): Permission denied at /var/www/html/mautic/vendor/symfony/filesystem/Filesystem.php:304)"} {"hostname":"ubuntu-4gb-nbg1-2","pid":551332}
[2026-01-30T06:20:04.797096+00:00] mautic.ERROR: Twig\Error\RuntimeError: An exception has been thrown during the rendering of a template ("Cannot rename "/tmp/url_generating_routes.phpXtKUU5" to "/var/www/html/mautic/var/cache/prod/url_generating_routes.php": rename(/tmp/url_generating_routes.phpXtKUU5,/var/www/html/mautic/var/cache/prod/url_generating_routes.php): Permission denied") in "@MauticCore/Default/script.html.twig" at line 7. - in file /var/www/html/mautic/app/bundles/CoreBundle/Resources/views/Default/script.html.twig - at line 7 [] {"hostname":"ubuntu-4gb-nbg1-2","pid":551332}
[2026-01-30T06:23:14.818105+00:00] mautic.CRITICAL: Uncaught PHP Exception Twig\Error\LoaderError: "Unable to find template "@MauticCore/Assets/pictograms/pilot-test.svg" (looked into: /var/www/html/mautic/app/bundles/CoreBundle, /var/www/html/mautic/app/bundles/CoreBundle/Resources/views) in "@MauticCore/Components/pictogram.html.twig" at line 4." at /var/www/html/mautic/app/bundles/CoreBundle/Resources/views/Components/pictogram.html.twig line 4 {"exception":"[object] (Twig\\Error\\LoaderError(code: 0): Unable to find template \"@MauticCore/Assets/pictograms/pilot-test.svg\" (looked into: /var/www/html/mautic/app/bundles/CoreBundle, /var/www/html/mautic/app/bundles/CoreBundle/Resources/views) in \"@MauticCore/Components/pictogram.html.twig\" at line 4. at /var/www/html/mautic/app/bundles/CoreBundle/Resources/views/Components/pictogram.html.twig:4)"} {"hostname":"ubuntu-4gb-nbg1-2","pid":550556}
There are many files missing when following the standard upgrade path. As a temporary workaround, you can use the following script-based method. Make sure to test this first in a staging environment before applying it to production.
Create a file named upgrade.sh in the root directory of your Mautic installation and paste the script content into it.
Set the correct permissions on the script:
chmod 755 upgrade.sh
Download the full Mautic release package (not the update package) from:
It’s not a bug. And waiting for an update won’t fix the problem.
The logs are actually crystal clear on the issue: Permission denied [2026-01-30T06:20:04.713899+00:00] mautic.CRITICAL: [..] Cannot rename [..] Permission denied [..] Cannot rename [..] Permission denied [..]
That means that you’re using the wrong user to perform what ever task that you’re trying to do. And then, when the correct user is trying to remove/update the file(s), it can’t.
The solution: Don’t use root. Once the web server is up, drop out of the root user and switch to the web one (before having Mautic even installed).
What do i have to to - or what made i wrong:
Server Admin: root
Normal user: user01
Apache Web Server works (as i know, but correct me, if i’m rong) with the user: www-data
Up until now, I’ve always done it like this:
user01$ sudo su - to get root rights
cd /var/www/html/mautic/ (Mautic directory)
php bin/console mautic:update:find (update with Mautic script)
You should be the web user all the time. And you should also stay away from root to avoid any confusion…
This is my ratio of root:web user use when it comes to manage any Mautic install:
0% root : 100% web user
Root is only used for managing the servers (and the users), and never to be used when using a web app nor any app (this is a huge security issue, and the why your app is failing with a critical error, as reported in the logs).
**One detail: You shouldn’t be managing your web app (Mautic) using the www-data user. But instead, create a user that will be dedicated to this environment (where the www-data user is allowed to interact with your files). Also, the web user shouldn’t be a sudoer. In other words, get out of the “/var/”. It doesn’t belong to your web user in any ways, shape or form. Use its own /home/ environment. i.e. /home/webadmin/public_html
Anyways, if I have to guess where you got it wrong (what you didn’t comment on)
You’re running your cronjobs using the wrong user (probably root).
The user01 i have only added to manage Mautic. Normal i go via ssh and this user to my Ubuntu 24.04 Server at Hetztner.com
Mautic is installed in: /var/www/html/mautic/
Now the 1 million$ question:
How should i make the update (please step by step for dummies, to find the error and understand why).