Body: <p>When doing a fresh install of CiviCRM 5.78.3 on Backdrop 1.29.1 (also a fresh install) using cv, I get this error:</p>
  <pre><code>In config.inc line 1723:
  
    [ConfigStorageException]
    Failed to write configuration file: ./files/config_144d1c53daf8087de3bda29d
    6e678c0d/active/user.role.authenticated.json
  </code></pre>
  <p>The file in question exists (it was put there during the Backdrop install) and appears to be untouched.  Directory permission are correct.  The config.inc file is part of Backdrop core, so I don't know whether this is a problem with Backdrop or CiviCRM.</p>
  <p>Trace:</p>
  <pre><code>Exception trace:
    at &lt;basedir&gt;/core/includes/config.inc:1723
   ConfigFileStorage-&gt;write() at &lt;basedir&gt;/core/includes/config.inc:1013
   Config-&gt;save() at &lt;basedir&gt;/core/modules/user/user.module:2622
   user_role_save() at &lt;basedir&gt;/core/modules/user/user.module:2756
   user_role_grant_permissions() at &lt;basedir&gt;/modules/civicrm/setup/plugins/installDatabase/FlushBackdrop.civi-setup.php:58
   civicrm_install_set_backdrop_perms() at &lt;basedir&gt;/modules/civicrm/setup/plugins/installDatabase/FlushBackdrop.civi-setup.php:29
   Civi\Setup::{closure}() at &lt;basedir&gt;/modules/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php:230
   Symfony\Component\EventDispatcher\EventDispatcher-&gt;callListeners() at &lt;basedir&gt;/modules/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php:59
   Symfony\Component\EventDispatcher\EventDispatcher-&gt;dispatch() at &lt;basedir&gt;/modules/civicrm/Civi/Core/CiviEventDispatcher.php:263
   Civi\Core\CiviEventDispatcher-&gt;dispatch() at &lt;basedir&gt;/modules/civicrm/setup/src/Setup.php:230
   Civi\Setup-&gt;installDatabase() at phar:///usr/local/bin/cv/src/Command/CoreInstallCommand.php:131
   Civi\Cv\Command\CoreInstallCommand-&gt;runSetup() at phar:///usr/local/bin/cv/src/Command/CoreInstallCommand.php:66
   Civi\Cv\Command\CoreInstallCommand-&gt;execute() at phar:///usr/local/bin/cv/vendor/symfony/console/Command/Command.php:155
   Cvphar\Symfony\Component\Console\Command\Command-&gt;run() at phar:///usr/local/bin/cv/vendor/symfony/console/Application.php:680
   Cvphar\Symfony\Component\Console\Application-&gt;doRunCommand() at phar:///usr/local/bin/cv/vendor/symfony/console/Application.php:218
   Cvphar\Symfony\Component\Console\Application-&gt;doRun() at phar:///usr/local/bin/cv/lib/src/BaseApplication.php:98
   Civi\Cv\BaseApplication-&gt;doRun() at phar:///usr/local/bin/cv/vendor/symfony/console/Application.php:124
   Cvphar\Symfony\Component\Console\Application-&gt;run() at phar:///usr/local/bin/cv/lib/src/BaseApplication.php:65
   Civi\Cv\BaseApplication-&gt;run() at phar:///usr/local/bin/cv/lib/src/BaseApplication.php:27
   Civi\Cv\BaseApplication::main() at phar:///usr/local/bin/cv/bin/cv:29
   require() at /usr/local/bin/cv:15
  </code></pre>
  <p>Any suggestions about how to proceed would be much appreciated.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-10-29T08:51:10.413Z
Comments.Text: Are you running `cv` as the same OS user that runs the webserver?  Do you get an error from `touch ./files/config_144d1c53daf8087de3bda29d6e678c0d/active/user.role.authenticated.json`  What do you get from `ls -ld files files/config_144d1c53daf8087de3bda29d6e678c0d files/config_144d1c53daf8087de3bda29d6e678c0d/active` ?
Comments.UserDisplayName: Aidan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-10-29T19:05:17.643Z
Comments.Text: Running cv as a regular user.  I ran 'chown -R myuser:_www files' and then 'chmod -R chmod -R g+rw files' then reran the install.  That seems to have fixed the problem.  Thank you!
Comments.UserDisplayName: charlie
Tags: <install><backdrop>
Title: Error writing configuration file on fresh install of CiviCRM on Backdrop
ThreadText: # Error writing configuration file on fresh install of CiviCRM on Backdrop
  
  (Asked by: username_0 on 2024-10-29)
  
  When doing a fresh install of CiviCRM 5.78.3 on Backdrop 1.29.1 (also a fresh install) using cv, I get this error:
  In config.inc line 1723:
  
    [ConfigStorageException]
    Failed to write configuration file: ./files/config_144d1c53daf8087de3bda29d
    6e678c0d/active/user.role.authenticated.json
  
  The file in question exists (it was put there during the Backdrop install) and appears to be untouched.  Directory permission are correct.  The config.inc file is part of Backdrop core, so I don't know whether this is a problem with Backdrop or CiviCRM.
  Trace:
  Exception trace:
    at /core/includes/config.inc:1723
   ConfigFileStorage->write() at /core/includes/config.inc:1013
   Config->save() at /core/modules/user/user.module:2622
   user_role_save() at /core/modules/user/user.module:2756
   user_role_grant_permissions() at /modules/civicrm/setup/plugins/installDatabase/FlushBackdrop.civi-setup.php:58
   civicrm_install_set_backdrop_perms() at /modules/civicrm/setup/plugins/installDatabase/FlushBackdrop.civi-setup.php:29
   Civi\Setup::{closure}() at /modules/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php:230
   Symfony\Component\EventDispatcher\EventDispatcher->callListeners() at /modules/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php:59
   Symfony\Component\EventDispatcher\EventDispatcher->dispatch() at /modules/civicrm/Civi/Core/CiviEventDispatcher.php:263
   Civi\Core\CiviEventDispatcher->dispatch() at /modules/civicrm/setup/src/Setup.php:230
   Civi\Setup->installDatabase() at phar:///usr/local/bin/cv/src/Command/CoreInstallCommand.php:131
   Civi\Cv\Command\CoreInstallCommand->runSetup() at phar:///usr/local/bin/cv/src/Command/CoreInstallCommand.php:66
   Civi\Cv\Command\CoreInstallCommand->execute() at phar:///usr/local/bin/cv/vendor/symfony/console/Command/Command.php:155
   Cvphar\Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/cv/vendor/symfony/console/Application.php:680
   Cvphar\Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/cv/vendor/symfony/console/Application.php:218
   Cvphar\Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/cv/lib/src/BaseApplication.php:98
   Civi\Cv\BaseApplication->doRun() at phar:///usr/local/bin/cv/vendor/symfony/console/Application.php:124
   Cvphar\Symfony\Component\Console\Application->run() at phar:///usr/local/bin/cv/lib/src/BaseApplication.php:65
   Civi\Cv\BaseApplication->run() at phar:///usr/local/bin/cv/lib/src/BaseApplication.php:27
   Civi\Cv\BaseApplication::main() at phar:///usr/local/bin/cv/bin/cv:29
   require() at /usr/local/bin/cv:15
  
  Any suggestions about how to proceed would be much appreciated.
  
  **Tags:** install, backdrop
  
  > **Comments:**
  > **username_1**: Are you running `cv` as the same OS user that runs the webserver?  Do you get an error from `touch ./files/config_144d1c53daf8087de3bda29d6e678c0d/active/user.role.authenticated.json`  What do you get from `ls -ld files files/config_144d1c53daf8087de3bda29d6e678c0d files/config_144d1c53daf8087de3bda29d6e678c0d/active` ?  
  > **username_0**: Running cv as a regular user.  I ran 'chown -R myuser:_www files' and then 'chmod -R chmod -R g+rw files' then reran the install.  That seems to have fixed the problem.  Thank you!  
  
  ---
  
  ## 0 answers
  
  