I tried that with:
chmod -R 755 /tmp
Now, when I attempt to update Mautic with:
php bin/console mautic:update:apply
php bin/console mautic:update:apply --finish
I get an error:
An error occurred while updating the database. Check log for more details.
There are two logs. One says:
[2022-09-01 19:50:13] mautic.NOTICE: Doctrine\DBAL\Exception\DriverException: An exception occurred while executing ‘SELECT COLUMN_NAME AS Field, COLUMN_TYPE AS Type, IS_NULLABLE AS Null
, COLUMN_KEY AS Key
, COLUMN_DEFAULT AS Default
, EXTRA AS Extra, COLUMN_COMMENT AS Comment, CHARACTER_SET_NAME AS CharacterSet, COLLATION_NAME AS Collation FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = ‘mauticdb’ AND TABLE_NAME = ‘email_stats’ ORDER BY ORDINAL_POSITION ASC’: SQLSTATE[HY000]: General error: 1 Can’t create/write to file ‘/tmp/#sql_337_0.MAI’ (Errcode: 13 “Permission denied”) (uncaught exception) at /var/www/html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 128 while running console command doctrine:migrations:migrate
{“hostname”:“newmautic”,“pid”:1326}
[2022-09-01 19:50:13] mautic.WARNING: Command doctrine:migrations:migrate
exited with status code 1 {“hostname”:“newmautic”,“pid”:1326}
[2022-09-01 19:50:13] mautic.WARNING: Command mautic:update:apply
exited with status code 1 {“hostname”:“newmautic”,“pid”:1326}
The other says:
[2022-09-01 19:50:13] console.CRITICAL: Error thrown while running command “doctrine:migrations:migrate --quiet --no-interaction”. Message: “An exception occurred while executing ‘SELECT COLUMN_NAME AS Field, COLUMN_TYPE AS Type, IS_NULLABLE AS Null
, COLUMN_KEY AS Key
, COLUMN_DEFAULT AS Default
, EXTRA AS Extra, COLUMN_COMMENT AS Comment, CHARACTER_SET_NAME AS CharacterSet, COLLATION_NAME AS Collation FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = ‘mauticdb’ AND TABLE_NAME = ‘email_stats’ ORDER BY ORDINAL_POSITION ASC’: SQLSTATE[HY000]: General error: 1 Can’t create/write to file ‘/tmp/#sql_337_0.MAI’ (Errcode: 13 “Permission denied”)” {“exception”:“[object] (Doctrine\DBAL\Exception\DriverException(code: 0): An exception occurred while executing ‘SELECT COLUMN_NAME AS Field, COLUMN_TYPE AS Type, IS_NULLABLE AS Null
, COLUMN_KEY AS Key
, COLUMN_DEFAULT AS Default
, EXTRA AS Extra, COLUMN_COMMENT AS Comment, CHARACTER_SET_NAME AS CharacterSet, COLLATION_NAME AS Collation FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = ‘mauticdb’ AND TABLE_NAME = ‘email_stats’ ORDER BY ORDINAL_POSITION ASC’:\n\nSQLSTATE[HY000]: General error: 1 Can’t create/write to file ‘/tmp/#sql_337_0.MAI’ (Errcode: 13 "Permission denied") at /var/www/html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:128, Doctrine\DBAL\Driver\PDO\Exception(code: HY000): SQLSTATE[HY000]: General error: 1 Can’t create/write to file ‘/tmp/#sql_337_0.MAI’ (Errcode: 13 "Permission denied") at /var/www/html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18, PDOException(code: HY000): SQLSTATE[HY000]: General error: 1 Can’t create/write to file ‘/tmp/#sql_337_0.MAI’ (Errcode: 13 "Permission denied") at /var/www/html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:141)”,“command”:“doctrine:migrations:migrate --quiet --no-interaction”,“message”:“An exception occurred while executing ‘SELECT COLUMN_NAME AS Field, COLUMN_TYPE AS Type, IS_NULLABLE AS Null
, COLUMN_KEY AS Key
, COLUMN_DEFAULT AS Default
, EXTRA AS Extra, COLUMN_COMMENT AS Comment, CHARACTER_SET_NAME AS CharacterSet, COLLATION_NAME AS Collation FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = ‘mauticdb’ AND TABLE_NAME = ‘email_stats’ ORDER BY ORDINAL_POSITION ASC’:\n\nSQLSTATE[HY000]: General error: 1 Can’t create/write to file ‘/tmp/#sql_337_0.MAI’ (Errcode: 13 "Permission denied")”} {“hostname”:“newmautic”,“pid”:1326}