Installation Routine - Error: EACCES: permission denied // shared webhosting

Your software
My Mautic version is: 5.2.3
My PHP version is: 8.2

Your problem
My problem is:
I’m trying to setup Mautic in a provided web hosting environment. I managed to install composer, nodeJS, npm, npx and also made sure the right enviroments are used for the installation via composer.

However, in the installation routine at the process step after
“Modernizr build saved to node_modules/modernizr/modernizr-mautic-dist.js” the process crashes, when the routine tries to write to a random file system root directory.

I set all caches an tmp directories to the user directory, but this remains broken.

These errors are showing in the log:

Modernizr build saved to node_modules/modernizr/modernizr-mautic-dist.js
node:fs:2427
return binding.writeFileUtf8(
^

Error: EACCES: permission denied, open ‘/zhSNPnRzVp’
at Object.writeFileSync (node:fs:2427:20)
at l (/node_modules/get-tsconfig/dist/index.cjs:7:11081)
at Object.createFilesMatcher (/node_modules/get-tsconfig/dist/index.cjs:7:11832)
at Object.ESBuildLoader (/node_modules/esbuild-loader/dist/index.cjs:51:35)
at LOADER_EXECUTION (/node_modules/loader-runner/lib/LoaderRunner.js:132:14)
at runSyncOrAsync (/node_modules/loader-runner/lib/LoaderRunner.js:133:4)
at iterateNormalLoaders (/node_modules/loader-runner/lib/LoaderRunner.js:251:2)
at /node_modules/loader-runner/lib/LoaderRunner.js:224:4
at /node_modules/webpack/lib/NormalModule.js:984:15
at eval (eval at create (/node_modules/tapable/lib/HookCodeFactory.js:33:10), :12:1) {
errno: -13,
code: ‘EACCES’,
syscall: ‘open’,
path: ‘/zhSNPnRzVp’
}

I removed parts of the pathes to remove ID Data, but the “path:” detail at the end is a real example: its a random path in the file system root, which of course can’t be written in a shared hosting environment.

Why is it trying to write there? Can I convince the script to write into a tmp path in my user directory?

Steps I have tried to fix the problem:

Tested several ways to set all tmp and cache paths relative into user directory. Mussed have missed one?

Seems to me that installing Muatic is impossible for anyone with out a PhD in computer science, and for 90% of those with PhDs. Good luck. I ran into about 25 of such issues one after the other after the other. I have reinstalled 5 times from a wiped free VPS. STILL after 2 weeks of issue after issue following ChatGPT on Mautic, then Deepseek, now Grok. I have yet to have a working Mautic install. This is AFTER I paid 2 separated programmers to install for about $2000 of my money. Neither of these computer professionals were able to successfully install a Mautic system. Good luck.

@dirk_s I put together a guide to install on shared VPS/droplet. It took me a couple of weeks to find the right combination of php, mysql, node, npm, composer, etc.

I’m not sure what to do with the error you’re describing though. hth

1 Like