I've built a Drupal 8.6.4 website within Acquia Dev Desktop, but moved it into a local Docker/Docksal setup to continue working (haven't used it before) - on a mac, if it matters. Everything seems fine, but for two issues. The first is a bunch of Security warnings in the logs about htaccess, saying to add an htaccess containing some specific code to the "/var/www/config/default" directory, but I don't have this file directory. It's a Docksal set-up: just ~/projects/projectname/docroot set-up on my computer.

The second issue, which I suspect may be related, is that I can't Drush archive-backup --destination=x/x/x.. It always tells me the file permission prevents it, Even if I give full read/write permission on the folder. But I can do it without the --destination added. It just puts it in a temp folder.

Here's the Error I see - it generates most any time I load an admin page.

    Security warning: Couldn't write .htaccess file. Please create a .htaccess file in your /var/www/config/default directory which contains the following lines:
    # Deny all requests from Apache 2.4+.
    <IfModule mod_authz_core.c>
      Require all denied

    # Deny all requests from Apache 2.0-2.2.
    <IfModule !mod_authz_core.c>
      Deny from all

    # Turn off all options we don't need.
    Options -Indexes -ExecCGI -Includes -MultiViews

    # Set the catch-all handler to prevent scripts from being executed.
    SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
    <Files *>
      # Override the handler again if we're run later in the evaluation list.
      SetHandler Drupal_Security_Do_Not_Remove_See_SA_2013_003

    # If we know how to do it safely, disable the PHP engine entirely.
    <IfModule mod_php5.c>
      php_flag engine off

1 Answer 1


There is a directory in the root of the Acquia project, config/default.So, all you need it's make it writable.

or you can change $config_directories['vcs'] and $config_directories['sync'] in your settings.php to somewhere which will be writable .

  • This is no longer in an Acquia project. The second option looks easy enough - I'm just not quite sure what I'm looking at. I don't have anything matching what you have above. The closest I have is $config_directories = array(CONFIG_SYNC_DIRECTORY => dirname($app_root) . '/config/' . basename($site_path),); ... Not quite the same, but I created a "sync" folder just above the docroot, and changed this code's /config/ to "../sync". Only been a few minutes, but errors haven't appeared yet. So... maybe I did the right thing? Merci!
    – turpentyne
    Dec 14, 2018 at 16:11
  • Dang.. Error is back. that didn't solve it.
    – turpentyne
    Dec 14, 2018 at 16:20
  • @turpentyne >This is no longer in an Acquia project. !!! are you sure about this because I'm working on a project nowdays that I'm use that folder for syncing Configuration on Environments, I have $config_directories['vcs'] = $app_root . '/../config/default'; on my local.settings.php you can test it.
    – Yuseferi
    Dec 15, 2018 at 0:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.