# Unable to create the cache directory

**URL:** <https://forum.mautic.org/t/unable-to-create-the-cache-directory/15752>\
**Category:** Mautic 3 - Install/Upgrade Support\
**Created:** [August 21, 2020, 11:16am UTC](https://forum.mautic.org/t/unable-to-create-the-cache-directory/15752 "2020-08-21T11:16:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![antonio-lazzari](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/antonio-lazzari/32/737_2.png) [@antonio-lazzari](https://forum.mautic.org/u/antonio-lazzari)\
**Post date:** [August 21, 2020, 11:16am UTC](https://forum.mautic.org/t/unable-to-create-the-cache-directory/15752/1 "2020-08-21T11:16:53Z")

</div>

**Mautic v2.16.3**  
_My PHP version is 7.4_

I launch:  
php app/console cache:clear -v

and I recevieve this  
[RuntimeException]  
Unable to create the cache directory (/home/…/app/cache/prod)

Exception trace:  
() at /home2/…/app/AppKernel.php:548  
AppKernel-\>buildContainer() at /home2/…/app/AppKernel.php:514  
AppKernel-\>initializeContainer() at /home2/…/app/AppKernel.php:276  
AppKernel-\>boot() at /home2/…/vendor/symfony/framework-bundle/Console/Application.php:62  
Symfony\Bundle\FrameworkBundle\Console\Application-\>doRun() at /home2/…/vendor/symfony/console/Application.php:117  
Symfony\Component\Console\Application-\>run() at /home2/…/app/console:43

some suggestions for installing 3.x  
thanks

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [August 21, 2020, 12:10pm UTC](https://forum.mautic.org/t/unable-to-create-the-cache-directory/15752/2 "2020-08-21T12:10:43Z")

</div>

Hi there, 7.4 support is not yet implemented, please drop to 7.3. Requirements can be found here: [https://www.mautic.org/download/requirements](https://www.mautic.org/download/requirements).

---

<div class="post-metadata">

**Author:** ![antonio-lazzari](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/antonio-lazzari/32/737_2.png) [@antonio-lazzari](https://forum.mautic.org/u/antonio-lazzari)\
**Post date:** [August 22, 2020, 8:04am UTC](https://forum.mautic.org/t/unable-to-create-the-cache-directory/15752/3 "2020-08-22T08:04:09Z")

</div>

Hi @silavapi,  
thanks but this is not the solution. The same error with PHP 7.2.31  
Is correct that in the log appears home2 instead of home???

# php --version

PHP 7.2.31 (cli) (built: Jun 15 2020 20:54:25) ( NTS )  
Copyright © 1997-2018 The PHP Group  
Zend Engine v3.2.0, Copyright © 1998-2018 Zend Technologies  
with the ionCube PHP Loader + ionCube24 v10.3.9, Copyright © 2002-2019, by ionCube Ltd.  
with Zend OPcache v7.2.31, Copyright © 1999-2018, by Zend Technologies

# php app/console cache:clear -v

[RuntimeException]  
Unable to create the cache directory (/home/…/app/cache/prod)

Exception trace:  
() at /home2/…/app/AppKernel.php:548  
AppKernel-\>buildContainer() at /home2/…/app/AppKernel.php:514  
AppKernel-\>initializeContainer() at /home2/…/app/AppKernel.php:276  
AppKernel-\>boot() at /home2/…/vendor/symfony/framework-bundle/Console/Application.php:62  
Symfony\Bundle\FrameworkBundle\Console\Application-\>doRun() at /home2/…/vendor/symfony/console/Application.php:117  
Symfony\Component\Console\Application-\>run() at /home2/…/app/console:43

---

<div class="post-metadata">

**Author:** ![devsrealm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/devsrealm/32/3669_2.png) [@devsrealm](https://forum.mautic.org/u/devsrealm)\
**Post date:** [August 22, 2020, 9:57am UTC](https://forum.mautic.org/t/unable-to-create-the-cache-directory/15752/4 "2020-08-22T09:57:20Z")

</div>

Clear the cache as the user that owns the mautic directory, this might help: [Please How are CACHES deleted Mautic 3?](https://forum.mautic.org/t/please-how-are-caches-deleted-mautic-3/15563/13)

Let us know how it goes!

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [August 24, 2020, 8:09am UTC](https://forum.mautic.org/t/unable-to-create-the-cache-directory/15752/5 "2020-08-24T08:09:56Z")

</div>

Sounds to me like file/folder permission issues. Take a look at the docs here:

> **[File ownership and permissions](https://docs.mautic.org/en/troubleshooting/file-ownership-and-permissions)**
>
> . If you experience errors like the following:. mautic.WARNING: PHP Warning require(/mautic/app/cache/prod/doctrine/orm/Proxies/CGMauticCategoryBundleEntityCategory.php): failed to open stream: No such file or directory - in file...

---

<div class="post-metadata">

**Author:** ![antonio-lazzari](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/antonio-lazzari/32/737_2.png) [@antonio-lazzari](https://forum.mautic.org/u/antonio-lazzari)\
**Post date:** [August 26, 2020, 4:59pm UTC](https://forum.mautic.org/t/unable-to-create-the-cache-directory/15752/6 "2020-08-26T16:59:34Z")

</div>

@devsrealm @silavapi thanks a lot.  
Our provider recently moved the mautic instance to another server cause to server problems. They make some mistakes in the folders’ property 😷
