Skip to content

Instantly share code, notes, and snippets.

@rickhernandezio
Last active January 19, 2023 17:56
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 8 You must be signed in to fork a gist
  • Save rickhernandezio/0ac76e656d331810138c6507aabd0f2b to your computer and use it in GitHub Desktop.
Save rickhernandezio/0ac76e656d331810138c6507aabd0f2b to your computer and use it in GitHub Desktop.
Permissions for Mautic
cd /var/www/mautic
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
chmod -R g+w app/cache/
chmod -R g+w app/logs/
chmod -R g+w app/config/
chmod -R g+w media/files/
chmod -R g+w media/images/
chmod -R g+w translations/
chown -R $USER:www-data .
@josaiasmoura
Copy link

Thanks for sharing this, but I did need to make few changes before it work for me.
I'm using Mautic version 2.15.1 (latest release).

cd /var/www/mautic
mkdir app/spool/
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
chmod -R g+w app/cache/
chmod -R g+w app/logs/
chmod -R g+w app/config/
chmod -R g+w media/files/
chmod -R g+w media/images/
chmod -R g+w translations/
chmod -R g+w app/spool/
chmod -R g+w themes
chown -R $USER:www-data .

@frazras
Copy link

frazras commented Sep 2, 2021

Mautic 3

find . -type f -not -perm 644 -exec chmod 644 {} +
find . -type d -not -perm 644 -exec chmod 755 {} +
chmod -R g+w var/cache/ var/logs/ app/config/
chmod -R g+w media/files/ media/images/ translations/
rm -rf var/cache/*

@cStuartHardwick
Copy link

Well that's...new.
Apparently, the php getting set to 8.0 was indeed the start of the problem. Then when I manually deleted the cache, since nothing could run correctly, something in the cache wasn't created correctly--no big surprise there. And you'd THINK that setting the php back down to 7.4 and deleting the cache would fix it--but it didn't.

However, when I deleted the cache the first time, I let it go to the trashcan. So having set the php down to 7.4 and manually wiped the cache again, I RESTORED this older cache, and now the site's working again. That's totally bizarre, but if makes me fear it's only working because there's something needed in the restored cache, and as soon as it's gone or I wipe the cahce I'll be dead again, so I'm going to zip the entire cache folder up for future reference/backup and try applying the latest upgrade and see what disasters I can invoke.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment