Hello,
I am in the process of upgrading a site from D7 to Backdrop CMS. Currently, the core/update.php script is failing with many errors about not being able to create config directory / files.
Failed: ConfigStorageException: Failed to write configuration file: ../config/active/system.core.json in ConfigFileStorage->write() (line 1347 of /var/www/html/backdrop1/core/includes/config.inc).
I had configured permissions as instructed in the documentation.
Because of the error above, I tried changing the config directory in settings.php back to be under the files/ subdirectory.
Httpd user is apache : apache and I have tried setting the files/ directory to
myuser : apache 770 (as directed)
myuser : apache 775
myuser : apache 777 <-- Just to make sure!
apache : apache 770
apache : apache 775
apache : apache 777
None of these options works.
So then I tried creating the hashed config directory and got this error:
The staging configuration directory (./files/config_[hash]/active) could not be found. Please make sure it exists and is properly referenced in settings.php.
After creating and changing owner to apache, I got similar error with the staging directory, so did the same. Then the update.php completes BUT I again get permission errors for each config file. E.g.
Failed: ConfigStorageException: Failed to write configuration file: ./files/config_[hash]/active/system.core.json in ConfigFileStorage->write() (line 1347 of /var/www/html/backdrop1/core/includes/config.inc).
But same permissions works fine for Drupal. What am I missing / how to fix?
Thanks.
Where is your settings.php file? In the installation root? Or inside sites/SITE_FOLDER? Typically, in a single-site installation, settings.php is in the root - therefore you have to be sure to correctly indicate the location of the config/active folder in $config_directories['active'] in settings.php
In your first error above, you pasted the path:
../config/active/system.core.json
If your settings.php is in the installation root, this will place the config file one level outside the installation root, which doesn't seem correct.
If your settings.php file is inside sites/SITE_FOLDER (typically a multisite installation), then typically the config folder is in:
./sites/SITE_FOLDER/files/config_HASH/active
You may need to create the sites/SITE_FOLDER/files folder.
The paths you posted above don't seem to match these patterns.