Fixing Mautic file permission and PHP limit errors

How to read the common Mautic cache, proxy, upload, execution time and memory errors, which setting or ownership change fixes each, and when to bring in outside help.

On this page

Why Mautic file permission and PHP limit errors appear and how to fix them

Cache, proxy, upload and timeout errors that appear after an install, an update or a busy campaign period are usually ownership or PHP configuration problems, and they can be diagnosed from the web server and PHP logs. Mautic is written in PHP on the Symfony framework, so when it writes to its cache or proxy folders, reads an uploaded file or runs a long job, the request runs under the web server's user and inside the limits set in PHP. Each class of error points to one of three places: the user the web server runs as, the PHP settings in effect for that request, or the host resources available to it. Start by reading the exact message and the log line that accompanies it, then check which of those three places it names.

Permission errors typically appear when files were created by a deployment user, a command run as root, or a Composer step, and the web server user cannot write to the cache, log or media directories afterward. Check the owner and group of the Mautic install path and the directories it must write to, and confirm the user your web server and PHP-FPM pool run as before changing anything. Upload size, execution time and memory limit messages come from PHP directives such as upload_max_filesize, post_max_size, max_execution_time and memory_limit, and the values that apply can differ between the CLI used by cron and the FPM pool serving browsers. Confirm both sets of values with the vendor documentation for your PHP version, because the values Mautic needs are set by the release you run, not by a fixed number in this guide.

Some of these faults are fixed in minutes, and others point to an undersized server or a host that is not suitable for Mautic. The Mautic project states that it should not be installed on shared hosting and recommends a VPS or dedicated server instead, so repeated limit errors on a constrained host are a sign to resize or re-platform rather than keep raising limits. Bring in a partner when errors recur after you correct ownership and PHP settings, when cron and web requests disagree on configuration, or when the fix would touch the database, web server and PHP stack together. Ask any partner for a written scope that names the logs reviewed, the settings changed and the rollback steps.

Which error points to which cause

Ownership and permission errors usually appear when Mautic cannot write to a folder it needs at runtime. The messages typically say that a directory or file is not writable, that a cache or log file could not be created, or that a proxy or media file could not be saved. The most common cause is that the web server user does not own the files, often because a deployment or update ran as root or as a deploy user. These failures tend to show up after an update, a restore, or a change to the release directory, and they can block pages that look unrelated to the file that failed.

  • Cache folder: messages about the cache directory point to the Symfony cache, which Mautic rebuilds on demand, so the web server user needs write access to it.
  • Log folder: a failure to open or write the application log often blocks requests entirely, which makes it look like a general outage.
  • Proxy and media folders: proxy or image files and uploaded media are written under the document root, so a permission gap there breaks specific features rather than the whole site.
  • Ownership versus mode: confirm the owner and group of the Mautic directory tree match the web server user, then check that directories are writable where Mautic writes.
  • Release directory changes: if the code was copied into a new directory, the new files may be owned by a different user than the one the web server runs as.

First check the owner and permissions of the folders named in your own log entries, and compare them with the user your web server runs as. Confirm the exact wording against your logs, because message text varies by version and by the component that failed.

How wrong file ownership breaks the cache and proxy folders

Wrong file ownership is one of the most common causes of Mautic errors that appear after a deploy, a server migration or a manual fix as root. Mautic writes to its cache, logs, media and proxy-related folders while it runs, and it does so as the user that the web server or PHP-FPM pool runs under, commonly www-data on Debian and Ubuntu or nginx or apache on other distributions. If a deploy was run as root or as a different user, those folders end up owned by someone the web process cannot write as, and pages fail when Mautic tries to generate cache files, proxy images or log entries.

To diagnose this, first identify the web user. Check the pool or service configuration (for example the user and group directives in your PHP-FPM pool file, or the User setting for Apache) and confirm it with ps aux on the running process. Then compare that user with the owner of the Mautic directories using ls -ld on the cache, logs, media and proxy paths, and test write access by running sudo -u with the web user to create and delete a temporary file in each folder. Fix ownership with chown on the affected folders only. Before changing anything, confirm the exact folders for your installed release against the Composer project layout in the How to install Mautic guide, because paths differ between versions and the folder list should not be copied from an older runbook.

Avoid the common quick fix of running chmod -R 777 on the Mautic tree. World-writable files let any local account or compromised process modify application code and configuration, and they weaken the separation between the web user and the rest of the server. Set ownership so the web user owns only the writable directories, and keep application code readable but not writable by that user where the release allows. If your team deploys as a different user, plan a deploy process that sets ownership after each release, and record the expected owner and mode in your runbook so that the next deploy is checked against it.

PHP and server settings that fix each error

This table compares the PHP and server settings behind common Mautic errors, showing what each controls, when raising it fits and where it is set. Use it to match the message you see to the right setting, then size the value against your PHP version and Mautic requirements. The main takeaway is that most fixes belong in the PHP-FPM pool or web server, and that raising limits without fixing ownership or resources rarely solves the problem.

Setting or fixWhat it controls and when it fitsTrade-off and where it is set
upload_max_filesizeLargest single file PHP accepts. Fits contact CSV imports and media or asset uploads that fail with an upload size message.Larger files use more memory and time during processing. Set in php.ini or the PHP-FPM pool, and confirm the web server body limit also allows it.
post_max_sizeTotal size of a whole POST request, including all form fields. Must be at least as large as upload_max_filesize or uploads fail silently.Higher values let oversized requests reach PHP and consume resources. Set in php.ini or the PHP-FPM pool; confirm the value against your PHP version.
max_execution_timeSeconds a PHP request may run. Fits long web requests such as large segment previews or exports that time out in the browser.Long requests hold workers and hide slow queries. Prefer background cron or messenger jobs for heavy work. Set in php.ini or the PHP-FPM pool.
memory_limitMemory one PHP process may allocate. Fits errors about allowed memory exhausted during imports, cache rebuilds or large processing jobs.Raising it lets each worker use more RAM, so total capacity drops as concurrency grows. Set in php.ini or the PHP-FPM pool, sized to host memory.
Ownership of cache and log foldersWeb server or PHP-FPM user must write to var/cache, var/logs and media folders. Fits permission denied errors when cache or proxy files fail to write.Over-broad permissions such as world-writable folders weaken the server. Set with chown and chmod on the Mautic directory, matching the PHP-FPM user.
Ownership of proxy and temporary pathsPaths used by the web server or upload handling must belong to the PHP-FPM or web server user. Fits failures when temporary upload files cannot be moved.Changing owners on shared paths can affect other services. Confirm the upload temp directory and the user in the pool before changing anything.
Restart after changePHP-FPM and the web server load configuration only at start or reload. Fits any case where the new value still appears unchanged.Reloads briefly affect active requests. Check the active php.ini with phpinfo or the CLI and reload the service after each change.

How to diagnose and fix a Mautic PHP limit error

This sequence moves from the logs to a single confirmed change, so the team fixes the failing action without guessing at ownership, PHP settings or cache state. Each step ends with a check that tells you whether to continue or revert.

  1. Collect the failing message from both logs

    Reproduce the failing action once, such as a file upload, a long import or a page that errors, and note the exact time. Read the Mautic application log under the var/logs directory, then read the web server error log and the PHP-FPM error log for the same minute. Look for the exact wording, such as an upload size limit, a max execution time message, a memory exhausted message, or a permission denied error on a cache or proxy path. Done when you have the verbatim error line and the file or setting it names, saved alongside the timestamp.

  2. Identify the PHP SAPI and the php.ini in use

    Run the PHP command line binary and the web-facing PHP process separately, because they often read different php.ini files. Check the active configuration path with the php --ini command, and in a web request use a temporary phpinfo page or the PHP-FPM pool configuration to see the loaded file and any per-pool overrides. Confirm which PHP version is serving Mautic, since the Mautic 7.0 requirements list PHP 8.2 through 8.5. Remove any temporary info page once you have the values. Done when you can name the SAPI, the ini file path and the PHP version that the web request uses.

  3. Confirm the web user and folder ownership

    Find the user that runs the web process, usually shown in the PHP-FPM pool or the Apache or Nginx configuration, and compare it with the owner and group of the Mautic installation, the cache directory, the logs directory and the media or proxy folders that the error names. Use ls with long listing and stat for the affected paths. Mismatched ownership on cache or proxy files is a common cause of write failures that look like PHP errors. Your administrator must make ownership changes, and they should be limited to the folders the application writes to. Done when the web user can write to each path named in the error and no other ownership has changed.

  4. Change one PHP setting and record it

    Pick the single limit that matches the error, such as the upload file size, post size, max execution time or memory limit, and change only that key in the php.ini file or PHP-FPM pool file identified in the previous step. Write the old value, the new value, the file path and the date in your change log before saving. Changing several limits at once makes it impossible to tell which one fixed the problem. Done when the change is saved in the correct file and the log entry exists.

  5. Restart the PHP and web services

    Restart PHP-FPM, or the web server if it embeds PHP, so the new value is loaded. Use the service manager for your distribution and check the service status afterwards. Then confirm the value took effect by reading it from the same SAPI used by the web request, not from the command line. Done when the service reports running and the new limit appears in the web-facing configuration output.

  6. Clear the Mautic cache from the command line

    Run the Mautic cache clear command from the installation root as the same user that runs the web process, so that new cache files are created with the correct ownership. Running it as root can recreate cache files the web user cannot write, which reintroduces the permission error. Confirm the command completes without errors and that the affected cache directory now holds files owned by the web user. Done when the command exits cleanly and the directory ownership matches the web user.

  7. Retest the failing action and decide whether to keep the change

    Repeat the exact action from the first step and compare the result with the original log line and timestamp. If the error is gone and the application log shows no new entries for that action, keep the change and note the result in your change log. If the error remains or a new error appears, revert the setting to the recorded old value, restart the services again and go back to the logs to test the next candidate. Done when the action completes and the log is clean, or the change is reverted and the next hypothesis is written down.

Security risks of quick fixes for permission and limit errors

Error messages about cache folders, uploads and timeouts tempt teams to apply the fastest fix that makes the page load. Each of the shortcuts below trades a visible failure for a quieter security problem, and the safer alternative is usually a narrower permission, a sized limit or a setting that keeps detail in the logs.

Opening application folders to everyone

Running chmod 777 on the Mautic tree makes cache and log errors disappear, but it also lets any local user or compromised process on the host change application code and configuration. The safer approach is to give the web server user write access only to the folders Mautic must write to, such as the cache, logs and media paths, and keep code read-only for that user. Check the result with ls -l on those paths after every fix.

Mautic install docs

Running PHP or the web server as root

Starting PHP-FPM, a cron job or a Composer command as root to avoid ownership errors means any code path that runs under that process can write anywhere on the server. The usual cause of the error is files created by one user and read by another, so the fix is to run every Mautic process under the same non-root account and correct ownership once. Confirm which user runs PHP-FPM, the web server and the cron jobs, and that they match.

Raising memory and time limits without bounds

Setting memory_limit or max_execution_time to very large values or to unlimited hides runaway processes such as imports or queue consumers that never finish. A stuck process can exhaust host memory and slow every other service on the machine. Size each limit to the largest job you actually run, document the reason next to the setting, and watch for jobs that repeatedly hit the new ceiling, since that points to a design or capacity problem.

Displaying errors to visitors

Setting display_errors to on in production, or leaving debug mode enabled, can send file paths, database errors and stack traces to anyone who triggers a failure on a public page. That detail helps an attacker map the application and the database layer. Keep display_errors off for the web-facing PHP pool, write errors to the server log, and confirm with a deliberately broken request that the browser shows only a generic error page.

Editing files in the vendor tree

Patching a file under the Composer vendor directory to fix a permission or limit message changes code that the next composer update will overwrite, so the fix quietly disappears during an upgrade. It also makes it hard to tell which files differ from the released package during a security review. Put configuration changes in the supported configuration files, keep local changes in version-controlled overrides, and record every manual change so an upgrade can reapply or drop it.

Mautic releases

When the errors are a hosting problem, not a setting problem

If the same limit errors return under normal load, the cause is usually the host, not the setting. Raising upload_max_filesize, max_execution_time or memory_limit buys time, but it does not add CPU, memory or disk I/O. The Mautic project states that Mautic should not be installed on shared hosting and recommends a VPS or dedicated server instead, as set out on the Mautic requirements page. If your instance runs on a shared plan, plan the move to a VPS or dedicated server before you spend more time tuning PHP.

Two checks separate an undersized host from a misconfigured one. First, confirm the PHP version running under your web server matches the range your Mautic release supports. Mautic 7.0 requires PHP 8.2, 8.3, 8.4 or 8.5, and the supported PHP versions differ between release lines, so check the entry for your exact release on the requirements page. Second, confirm the database meets the minimum for that release. Mautic 7.0 requires MySQL 5.7 or higher with InnoDB, or MariaDB 10.2 or higher. Run php -v from the same user and environment that serves Mautic, because the CLI and the web server can load different PHP builds.

Confirm the supported versions for your release on the requirements page before you change hardware or PHP packages, and record the results in your change log. If the version is in range and limit errors still appear during imports, sends or cache rebuilds, ask your hosting or platform team to review CPU, RAM and disk latency at those times. Moving to a different PHP or database version is a platform change that should be tested against a copy of the instance first.

Questions teams ask before fixing Mautic PHP and permission errors

How long does a typical Mautic permission or PHP limit fix take?

No fixed duration can be given for every instance, because the time depends on what is broken and how much access the team has. A single ownership or ini setting change on a server you can reach is usually a short task, while a capacity problem that needs hosting changes takes longer. The main drivers are log access, the number of environments that must be checked (production, staging and any test copy), and whether the hosting provider lets you change PHP and web server settings yourself. Ask any partner to state the time as a range tied to the environments in scope and the access you grant.

Can our in-house Mautic admin fix these errors without a partner?

Often yes for ownership and single settings. Correcting the owner and group of the cache, log and media folders, or raising a value such as upload_max_filesize, max_execution_time or memory_limit, is routine for a team that can use SSH and edit PHP configuration. The work gets harder when the error reflects capacity, such as repeated memory exhaustion during imports, campaign runs or queue processing, because the fix may involve hosting size, worker configuration and database tuning. Mautic should also not run on shared hosting, according to the project's requirements, so confirm that your host is a VPS or dedicated server before you tune limits.

What does a partner quote for this work depend on?

A quote follows from a written scope, so it depends on the work you define. The main inputs are the number of environments in scope, the access the partner receives, whether the scope covers diagnosis only or diagnosis and fixes, whether the work includes retesting after changes, and whether an upgrade plan sits alongside the fix. Engagements at DeployOpen are usually fixed-scope, with scope, deliverables and timelines agreed in writing before work starts. Ask for each item to be listed separately so you can see what is included and what would be a change request.

What access and information does the work need from our team?

The work needs a clear view of the failing system and the ability to make changes. In practice, that means SSH access to the Mautic server or containers, read access to the web server, PHP-FPM and Mautic logs, and the rights to edit PHP configuration and web server settings or ask your hosting provider to do so. It also helps to have the Mautic version, the PHP version and the exact error text with timestamps. Confirm early who will approve production changes, who can restart services, and where backups are kept before any change is made.

Will the fix survive future Mautic updates?

A correct ownership or limit change normally persists, but the setting can be reset by a new PHP package, a rebuilt container or a hosting control panel. Before each update, check the Mautic release notes for the target version, confirm that the PHP version is still supported by that release, and rerun the affected action after the update, such as a cache rebuild, an import or a campaign run. Treat the fix as verified only after a retest on a copy of the instance, not because the setting was present on the day it was made.

Is the cost of fixing these errors one-time or recurring?

The diagnosis and change are usually one-time costs, but some related items recur. Recurring costs include hosting that is sized larger, monitoring of logs, scheduled cron and queue workers, and any retainer for ongoing support or upgrades. A one-time engagement covers the fix, documentation and retest. Ask a quote to separate these lines, and ask which costs stay with your hosting provider and which stay with your own team. Support and continuous testing are available as retainers if you want ongoing cover.

Which Mautic errors should our engineers check before calling for help?

Engineers should first check the web server error log, the PHP-FPM log and the Mautic log for the exact message, then compare the owner and permissions of the cache, logs and media directories with the user that runs PHP. They should also confirm the effective values of memory_limit, max_execution_time and upload_size limits in the PHP version used by the web server, since the CLI and web settings can differ. Record which request or cron job fails, because many limit errors only appear during imports or background runs.

What to confirm in your own environment before changing settings

Most permission and PHP limit errors come from a mismatch between the Mautic release, the PHP runtime and the web server that serves it. Confirm each of these values on your own host before changing any setting, because the fix for one error can break another.

Mautic release and PHP version

Start with the Mautic release you run, then confirm the PHP version it supports on the requirements page. Mautic 7.0 requires PHP 8.2, 8.3, 8.4 or 8.5, so an older PHP build can produce errors that look like permission or memory faults. Run php -v on the same host that serves web requests, since the CLI version can differ from the one behind your web server.

Requirements page

Web server and its user

Confirm whether the server is Apache, Nginx or IIS, and which system user it runs as, such as www-data on Debian-based systems or nginx on some Red Hat builds. Cache and proxy write failures usually appear when the Mautic files are owned by a different account, such as root after a manual Composer run. Check the user with ps aux and compare it with the owner of the var and media folders.

PHP-FPM or mod_php

Determine whether PHP runs as PHP-FPM behind Nginx or Apache, or inside Apache as mod_php. Under PHP-FPM, the pool file sets the user, group and some limits, so a change in php.ini may not apply to the pool your site uses. Confirm which handler serves the Mautic domain before editing any limit.

Active php.ini and pool files

PHP can load more than one configuration file, and the command line and web SAPI often read different ones. Run php --ini and phpinfo() through a temporary page you remove afterward to see the loaded file. For PHP-FPM, check the pool file's user, group, pm.max_children and any php_admin_value overrides, because those values override the global file.

Database version

Confirm the MySQL or MariaDB version against the requirements page, since Mautic 7.0 requires MySQL 5.7 or higher with InnoDB, or MariaDB 10.2 or higher. Permission and memory errors can coincide with database connection limits, so note the engine and version before you change PHP memory settings. Ask your database administrator for the server version and default storage engine.

Shared hosting or dedicated server

Confirm whether the host is shared hosting or a VPS or dedicated server. The Mautic project states that it should not be installed on shared hosting and recommends a VPS or dedicated server. On shared hosting you often cannot change the pool file, the web server user or the global php.ini, so ask the provider which limits they allow before you plan a fix.

Hosting requirements

Diagnosis path from error to fix

The path starts when a Mautic page or console command fails, and the first hand-off is to the server logs, which show whether the failure is a write error, an upload or post size limit, a max execution time limit, or a memory limit. Each branch leads to one setting change: folder ownership and permissions, PHP upload settings, max execution time, or the memory limit. If the same error returns after the change, the path moves to host sizing and version checks, because under-resourced hosting causes repeated failures. Every path ends with a retest and a written record of the change.

Decision path from a Mautic error to the setting that fixes it.

How DeployOpen scopes a Mautic server error fix

A scoped engagement for a Mautic server error starts with read access to evidence, not changes to production. In practice that means the web server and PHP-FPM or Apache error logs, the Mautic logs written under the application's var/logs directory, the PHP configuration in use by the web process (not only the CLI), the web server virtual host and the Mautic release and PHP version actually running. Before any work is agreed, confirm which of these you can share, how they will be transferred, and whether the instance is single server or split across web and worker hosts, because a permission or limit fix applied to one host will not reach the others.

The written scope usually separates four parts: diagnosis of the failing path (cache, proxy, upload, execution time or memory), the fixes themselves, a retest that reproduces the original action such as an asset upload or a long-running command, and documentation of the changed ownership, modes and PHP directives so your team can repeat the steps. Ask the provider to name which files and directories will change, which account owns them afterwards, and how the fixes will be reverted if they cause a regression. Quotes should state these items explicitly rather than bundling them into a general hardening task.

All changes run in your own environment, under your change control, on servers you operate or have contracted for. The provider works through access you grant for the agreed window and hands back a list of every command run and file touched. Confirm with your provider who holds the credentials used, how long that access lasts, and where session logs are stored, and confirm that your own staff will be able to rerun each fix after the engagement ends.

How DeployOpen delivers Mautic operations support

DeployOpen works on Mautic file permission and PHP limit errors as a self-hosted platform inside your own infrastructure, starting from the error messages and logs your team already has. We scope the fix in writing, make the ownership and PHP changes in your environment, and document what was changed so your team can repeat the check later.

How we scope

  • Written scope lists the affected Mautic instance, the error messages reported, and the hosting stack in use.
  • Scope records which web server user, PHP-FPM pool and directories are in question before any change is made.
  • Engagements are fixed-scope, so deliverables and timelines are agreed in writing before work starts.

How we build

  • We confirm current ownership and permissions on the cache, log, media and proxy directories against your web server user.
  • We review the PHP settings for upload size, execution time and memory limits in the environment that serves Mautic.
  • We test each change on a copy of the instance first, then apply it to production during a window you approve.

How we hand over

  • You receive a written record of each ownership change, PHP setting, file path and the reason it was made.
  • Runbook steps explain how to recheck permissions after a deployment, update or cache clear.
  • We walk your platform and operations staff through the diagnosis steps so they can recognize the same errors later.

How we support

  • Ongoing support, upgrades and continuous testing are available as a retainer for Mautic instances that need regular attention.
  • Retainer work can cover re-checking permissions and PHP limits after each Mautic release on a supported line.
  • Ask us to confirm which support terms, response expectations and review cadence apply before you sign.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.