When trying to upgrade I get the following:
Validation issue
Validator “Restore” returned fail status
File
Unable to prepare restore script.
For add-ons that you can skip “create backup” they upgrade ok. But the core updates that you can’t skip the backup, this error has me stuck.
The config.local.php
has this as far as file permissions go:
// Default permissions for newly created files and directories
define('DEFAULT_FILE_PERMISSIONS', 0666);
define('DEFAULT_DIR_PERMISSIONS', 0777);
However, the upgrades folder’s permissions are 0755 and the source_restore.php
has 0666.
The folders that are created inside the upgrades folder (eg core_4.18.1.SP1-4.18.2
) gets permissions 0755. It’s files, get permissions 0644.
Now, I tried changing the config.local.php
and used this:
// Default permissions for newly created files and directories
define('DEFAULT_FILE_PERMISSIONS', 0644);
define('DEFAULT_DIR_PERMISSIONS', 0755);
Which matched the permissions of the folders and files that are being created but the result is the same.
Please note that Inside the upgrades folder, the folder core_4.18.1.SP1-4.18.2
is being created and it contains the following PHP file: restore_2024-11-15_11-53-41.php
It’s an Nginx server using PHP-FPM. PHP version is 8.1
----Added Notes—
Found the upgrade log in /var/upgrade
(core_log.txt
)
################################################################################
################################################################################
2024-11-15 11:59:25: Starting installation of the "core" upgrade package
2024-11-15 11:59:25: Upgrading version 4.18.1.SP1 to 4.18.2
2024-11-15 11:59:25: Running as user "owner"
2024-11-15 11:59:25: Storing entry point files permissions...
2024-11-15 11:59:25: index.php ==> 33184 (-rw-r-----)
2024-11-15 11:59:25: admin-cp.php ==> 33184 (-rw-r-----)
2024-11-15 11:59:25: api.php ==> 33184 (-rw-r-----)
2024-11-15 11:59:25: ==> 16888 (drwxrwx---)
2024-11-15 11:59:25: Executing pre-upgrade validators
2024-11-15 11:59:25: Found 0 validators at package
2024-11-15 11:59:25: Executing "collisions" validator
2024-11-15 11:59:25: Executing "permissions" validator
2024-11-15 11:59:25: Executing "restore" validator
2024-11-15 11:59:25: Backup filename is "upg_core_4.18.1.SP1-4.18.2_15Nov2024_115925"
2024-11-15 11:59:25: Preparing restore script
2024-11-15 11:59:25: Upgrades directory permissions: drwxrwxrwx owner:owner
2024-11-15 11:59:25: Source restore script permissions: -rw-rw-rw- owner:owner
2024-11-15 11:59:25: Directory "/home/owner/htdocs/***.*******.***/upgrades/core_4.18.1.SP1-4.18.2/" for restore script already created
2024-11-15 11:59:25: Created restore script at "/home/owner/htdocs/***.*******.***/upgrades/core_4.18.1.SP1-4.18.2/restore_2024-11-15_11-59-25.php"
2024-11-15 11:59:25: Restore script permissions: -rw-r--r-- owner:owner
2024-11-15 11:59:25: Correcting target restore script directory permissions...
2024-11-15 11:59:25: ----------
2024-11-15 11:59:25: Changing permissions of "/home/owner/htdocs/***.*******.***/upgrades/core_4.18.1.SP1-4.18.2/" to 755
2024-11-15 11:59:25: Using chmod()... OK
2024-11-15 11:59:25: ----------
2024-11-15 11:59:25: Target restore script directory permissions: drwxr-xr-x owner:owner
2024-11-15 11:59:25: Correcting upgrades directory permissions...
2024-11-15 11:59:25: ----------
2024-11-15 11:59:25: Changing permissions of "/home/owner/htdocs/***.*******.***/upgrades" to 755
2024-11-15 11:59:25: Using chmod()... OK
2024-11-15 11:59:25: ----------
2024-11-15 11:59:25: Upgrades directory permissions: drwxr-xr-x owner:owner
2024-11-15 11:59:25: Checking restore script availability via HTTP/HTTPS
2024-11-15 11:59:25: Restore script is NOT available via HTTP at "https://***.*******.***/upgrades/core_4.18.1.SP1-4.18.2/restore_2024-11-15_11-59-25.php".
2024-11-15 11:59:25: Upgrade stopped: unable to prepare restore file.