# Immediate failure during install

**URL:** <https://forum.mautic.org/t/immediate-failure-during-install/24442>\
**Category:** Mautic 4 Install/Upgrade Support\
**Created:** [June 13, 2022, 1:05pm UTC](https://forum.mautic.org/t/immediate-failure-during-install/24442 "2022-06-13T13:05:42Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![roblefko](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/roblefko/32/4958_2.png) [@roblefko](https://forum.mautic.org/u/roblefko)\
**Post date:** [June 13, 2022, 1:05pm UTC](https://forum.mautic.org/t/immediate-failure-during-install/24442/1 "2022-06-13T13:05:42Z")

</div>

**Your software**  
_My PHP version is_ : 7.4  
_My MySQL/MariaDB version is_ 10.3.35

**Updating/Installing Errors**  
\*I am: Installing Mautic 4.3.1  
_installing via_ Command Line

_These errors are showing in the installer_ :

## The site is currently offline due to encountering an error. If the problem persists, please contact the system administrator.

#### System administrators, check server logs for errors.

_These errors are showing in the Mautic log_ : empty - mautic/var/logs directory is empty.

_My problem is_ :  
I am attempting a normal installation: downloaded zip file from [mautic.org](http://mautic.org), uploaded it to my subdomain, unzipped install package; created DB, and updated php max\_execution\_time to 240. When I browse to [mymautic.mydomain.org](http://mymautic.mydomain.org), I immediately see that I am redirected to [mymautic.mydomain.org/installer](http://mymautic.mydomain.org/installer), and I am presented with the error message:  
The site is currently offline due to encountering an error. If the problem persists, please contact the system administrator.  
System administrators, check server logs for errors.

Note that this is occurring before I even reach the environment check page.

_Steps I have tried to fix the problem_ :  
I’ve checked permissions, which all seem to be correct - I’ve even updated the permissions to allow all users to access and retried, but I get the same result. I’ve also checked the logs, which appear to be empty.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [June 14, 2022, 10:28am UTC](https://forum.mautic.org/t/immediate-failure-during-install/24442/2 "2022-06-14T10:28:37Z")

</div>

Hi  
If you manually run the cache clear command, what error you are getting?

`php bin/console cache:clear`

Make sure you run it as a web user otherwise all your assets will be overwritten with the wrong user.  
You should get a nice green message.

---

<div class="post-metadata">

**Author:** ![roblefko](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/roblefko/32/4958_2.png) [@roblefko](https://forum.mautic.org/u/roblefko)\
**Post date:** [June 14, 2022, 10:46am UTC](https://forum.mautic.org/t/immediate-failure-during-install/24442/3 "2022-06-14T10:46:18Z")

</div>

What do you mean by running it as a web user?

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [June 15, 2022, 6:01am UTC](https://forum.mautic.org/t/immediate-failure-during-install/24442/4 "2022-06-15T06:01:28Z")

</div>

When you login to your ssh as root and give commands as root then you spoil the cache file system by generating files with the wrong owner. Files have to be generated with the user that runs apache or nginx. Often this is user www-data.

---

<div class="post-metadata">

**Author:** ![aerea](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/aerea/32/7907_2.png) [@aerea](https://forum.mautic.org/u/aerea)\
**Post date:** [July 7, 2022, 7:21pm UTC](https://forum.mautic.org/t/immediate-failure-during-install/24442/5 "2022-07-07T19:21:07Z")

</div>

I have this same issue but all files are owned by the www user. @joeyk you never answered the question of how do you run the command with the web user.

I’m using NGINX. Please unmark as solved as it is still an issue and the referenced solution does not apply to all situations.

The Mautic team needs to be more upfront about system requirements and also need to list required php modules and nginx configuration.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [July 7, 2022, 7:56pm UTC](https://forum.mautic.org/t/immediate-failure-during-install/24442/6 "2022-07-07T19:56:28Z")

</div>

Hi @aerea !  
I never mark my answers as solution, I guess it worked out for the original poster of the solution, so he marked it.  
Running a command as a specific user is rather a linux question then Mautic. Since I don’t know if you use Ubuntu, Alpine or Suse, I’m trying to give generic answers. There are many resources for that. This is a good one:

> <https://askubuntu.com/questions/294736/run-a-shell-script-as-another-user-that-has-no-password>

When a problem is described in a new forum post, I try to throw in some ideas, and see which sticks. Permission, cache is usually the first move I’d do. Especially based on his description, I figured the admin user unzipped the files and the webserver couldn’t access the files.

There is no solution for all situations. When you go to the doctor, he will also not fix you with the same pill if you have broken leg or high blood pressure.

Based on your description:

1. You just installed Mautic, and couldn’t run the installer, altough the domain name resolves
2. You checked the permissions, they are all okay
3. File ownership is the www user, who runs the nginx server

Regarding requirements:  
I’m using the FIRST GOOGLE result to install Mautic with Nginx and it runs really well:

> **[How to Install Mautic Marketing Automation Tool on Ubuntu 20.04](https://www.howtoforge.com/tutorial/how-to-install-mautic-marketing-automation-tool-on-ubuntu-2004/)**
>
> Mautic is an open source self-hosted marketing automation tool for everyone. You can use it to grow up your business, monitor your website, create lan...

---

<div class="post-metadata">

**Author:** ![aerea](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/aerea/32/7907_2.png) [@aerea](https://forum.mautic.org/u/aerea)\
**Post date:** [July 8, 2022, 1:21am UTC](https://forum.mautic.org/t/immediate-failure-during-install/24442/7 "2022-07-08T01:21:15Z")

</div>

Sorry, didn’t understand the process. Appreciate the insight. Hopefully some of this info helps.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [July 8, 2022, 12:22pm UTC](https://forum.mautic.org/t/immediate-failure-during-install/24442/8 "2022-07-08T12:22:44Z")

</div>

Hey,  
No worries! You can open another topic and we can try to fix your problem as well!
