[SOLVED] Neos 4.3 Setup fails: "The cache file .... could not be written"

Hello everyone!

After a while I want to re-start a Neos-project.

I created a VM Vagrant Ubuntu machine, wants to provide neos with apache. All in all like this:


But the mypage.local/setup is crashing. First I saw the “Initializing Setup”-screen with the hint:

“We are now redirecting you to the setup. This might take 10-60 seconds on the first run, because the application needs to build up various caches.”

Sometimes he is crashing here, but actually (new install) he is asking for my “setup password”. But lately after this step, it’s crashing. On the one hand, I have no database connection at this point

SQLSTATE[HY000] [1045] Access denied for user ‘’@‘localhost’ (using password: NO)

But I think this is not the point. This would handled by the setup or could be done manually.

On the other hand I have a more problematic issues with the cache. Again and again, like this (Neos error log Data/Logs/Exception):

Exception #1222361632 in line 70 of /var/www/public/neos/Packages/Libraries/neos/cache/Classes/Frontend/VariableFrontend.php: The cache file “/var/www/public/neos/Data/Persistent/Cache/Data/Flow_Session_Storage/8a10bf5c-571e-437c-9517-cbbe8c359cab8dbf29f263d6f259edfdefc9fc6943bf” could not be written.

I’ve set the Apache permissions like described here:


But this didn’t helped.

Another error-code from the browser (if he is crashing while setup initialize):

The cache file “/var/www/public/neos/Data/Temporary/Development/Cache/Data/Flow_Aop_RuntimeExpressions/flow_aop_expression_942ce3c9fa850e494fe979c006756e2e” could not be written.

Type: Neos\Cache\Exception
Code: 1334756737
File: Packages/Libraries/neos/cache/Classes/Backend/SimpleFileBackend.php
Line: 166

Exception Code 1355480641
Exception Type Neos\Flow\Core\Booting\Exception\SubProcessException
Log Reference 20190610130639ad01fa
Thrown in File Packages/Framework/Neos.Flow/Classes/Core/Booting/Scripts.php
Line 718

Did someone has an idea? I tried a lot so manage apache user and groups handling. But this should not be necessary. It’s strange for me.

Okay, I could solved it now by myself. If I set up a further vagrant machine for a Typo3-Project, the same error was shown (cannot write cache; SimpleFileBackend).

So I watched in this from another side and could find out, that this error comes from multiple right-access. I found a source, there where mentioned, that this problem could occur while using php-mod and php-cgi at the same time (don’t ask me for it). But this brings me to the right-management between my host and my VM.

For all Vagrant users with the same error:
-> I changed my synced_folder from

config.vm.synced_folder “./”, “/var/www/public”

-> To NFS with a UID and GID mapping:

config.vm.synced_folder “./”, “/var/www/public”, mount_options: [“nolock”], nfs: true
config.nfs.map_uid = 1000
config.nfs.map_gid = 1000

1 Like