# Mautic 7 installation error: “The directory must be writable” (PHP 8.4) – Missing var/logs folder

**URL:** <https://forum.mautic.org/t/mautic-7-installation-error-the-directory-must-be-writable-php-8-4-missing-var-logs-folder/37453>\
**Category:** Product Support\
**Created:** [March 7, 2026, 12:32pm UTC](https://forum.mautic.org/t/mautic-7-installation-error-the-directory-must-be-writable-php-8-4-missing-var-logs-folder/37453 "2026-03-07T12:32:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexrm1x](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/alexrm1x/32/2500_2.png) [@alexrm1x](https://forum.mautic.org/u/alexrm1x)\
**Post date:** [March 7, 2026, 12:32pm UTC](https://forum.mautic.org/t/mautic-7-installation-error-the-directory-must-be-writable-php-8-4-missing-var-logs-folder/37453/1 "2026-03-07T12:32:20Z")

</div>

**Your software**  
My Mautic version is: 7x  
My PHP version is: 8.4  
My Database type and version is:

**Your problem**  
My problem is:

While installing **Mautic 7** using the recommended Composer method with **PHP 8.4** , the installer may stop with the following message:

Major Problems that need to be fixed now

We have detected 1 major problems. You must fix them before continuing:

The directory must be writable. Change the permissions of the directory so that the web server can write into it.

These errors are showing in the log:

In my case, permissions were already correct and the web server was able to write to the filesystem, but the installer still reported the error.

Steps I have tried to fix the problem:

**Root cause**

When creating the project using Composer:

composer create-project mautic/recommended-project:^7 mautic

the directory **`var/logs` is not created**.

### 

 ![2026-03-07_13-31-49](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/b/b46848026358ab7efb0ed9950d623779bc6987da.jpeg)

---

<div class="post-metadata">

**Author:** ![alexrm1x](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/alexrm1x/32/2500_2.png) [@alexrm1x](https://forum.mautic.org/u/alexrm1x)\
**Post date:** [March 7, 2026, 12:32pm UTC](https://forum.mautic.org/t/mautic-7-installation-error-the-directory-must-be-writable-php-8-4-missing-var-logs-folder/37453/2 "2026-03-07T12:32:44Z")

</div>

### Solution

Simply create the missing directory manually and give it the correct permissions.

example:

cd /path/to/mautic

mkdir -p var/logs  
chmod 775 var/logs  
chown -R : var/logs

After creating the folder, refresh the installer and the error disappears.

### My directory structure

mautic/  
├── config/  
├── docroot/  
├── var/  
│ ├── cache/  
│ ├── logs/  
│ └── tmp/

Tip for fresh installations

After installing Mautic with Composer, it is a good idea to ensure the runtime directories exist:

mkdir -p var/cache var/logs var/tmp  
chmod -R 775 var

This prevents installation issues related to missing runtime directories.

---

<div class="post-metadata">

**Author:** ![marcus42](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@marcus42](https://forum.mautic.org/u/marcus42)\
**Post date:** [March 7, 2026, 7:02pm UTC](https://forum.mautic.org/t/mautic-7-installation-error-the-directory-must-be-writable-php-8-4-missing-var-logs-folder/37453/3 "2026-03-07T19:02:57Z")

</div>

Under Linux, files are 0644 and directories are 0755

To fix the permissions:  
`cd /path/to/mautic`  
`find . -type f | xargs chmod 0644`  
`find . -type d | xargs chmod 0755`

Other tip:  
Make sure that your prompt is starting with a **$** and not a **#**. In other words, don’t be root\*\*\*

\*\* The root user is never required to manage a web app. If you do, you’re doing it wrong.\*

---

<div class="post-metadata">

**Author:** ![bastianhammer](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/bastianhammer/32/14826_2.png) [@bastianhammer](https://forum.mautic.org/u/bastianhammer)\
**Post date:** [March 10, 2026, 4:58am UTC](https://forum.mautic.org/t/mautic-7-installation-error-the-directory-must-be-writable-php-8-4-missing-var-logs-folder/37453/4 "2026-03-10T04:58:18Z")

</div>

Hello Alex,

which version of Mautic 7 are you using?  
See this issue on the 7.0.0:

> <https://github.com/mautic/mautic/issues/15715>
>
> \### Mautic Series
> 
> 7.0.x series
> 
> \### Mautic installed version
> 
> 7 rc
> 
> \### Way of …installing
> 
> I installed with composer using https://github.com/mautic/recommended-project
> 
> \### PHP version
> 
> 8.3
> 
> \### What browsers are you seeing the problem on?
> 
> \_No response\_
> 
> \### What happened?
> 
> After composer installing my Mautic 7 environment, I pull up the browser and try to install / setup Mautic there.
> 
> I get:
> 
> \<img width="1136" height="695" alt="Image" src="https://github.com/user-attachments/assets/4e3b2229-6869-42a6-a6f5-71b938795490" /\>
> 
> Permissions seem to be all in order, according to the docs.
> Oddly enough, there is an odd character and now path / details about the issue pointed out.
> 
> After some digging, I found out, that the \`var/logs\` folder is missing.
> 
> So I've created it and now I see:
> 
> \<img width="1136" height="517" alt="Image" src="https://github.com/user-attachments/assets/71515f12-157d-4a12-b79b-74ab4facee2a" /\>
> 
> Would probably be best, if the composer install could create the logs folder already.
> 
> Maybe it's related to my other install issues? But I had to do this on another environment as well, where the installation worked smoothly.
> https://github.com/mautic/mautic/issues/15714
> 
> \### How can we reproduce this issue?
> 
> Step 1: Composer install
> 
> \### Relevant log output
> 
> \`\`\`shell
> 
> \`\`\`
> 
> \### Code of Conduct
> 
> \- \[x\] I confirm that I have read and agree to follow this project's Code of Conduct
> 
> \<br /\>\<hr\>
> Care about this issue? Want to get it resolved sooner? If you are a \<a href='https://www.mautic.org/become-a-member-of-mautic'\>member of Mautic\</a\>, you can add some funds to the \<a href='https://opencollective.com/mautic/projects/bounties'\>Bounties Project\</a\> so that the person who completes this task can claim those funds once it is merged by a member of the core team! Read the docs \<a href='https://contribute.mautic.org/product-team/mautic-bounty-programme'\>here.\</a\>
