4

I'm installing Drupal 8 with using Composer. During the requirements verification phase I receive this error.

Requirements problem
Errors found

Configuration directory: sync
An automated attempt to create the directory ../config/sync failed, possibly due to a permissions problem. To proceed with the installation, either create the directory and modify its permissions manually or ensure that the installer has the permissions to create it automatically. For more information, see INSTALL.txt or the online handbook.

As I understand it, the full path to the sync directory should be project_root/web/sites/default/files/config/sync, but if I run chown myuser:www-data to the project_root directory, Drupal will literally place the folder as in the error message, project_root/config/sync in my case.

I've never installed Drupal 8 via Composer, but this appears wrong and I can't find any relevant information.

3 Answers 3

14

Nothing wrong with that.

It is recommend to have the config folder outside of the public web folder; Drupal just doesn't have that. To keep the installation simple for non-experienced users, it puts that folder in the files folder, which has to be writable anyway.

Just create that folder and give Drupal write permission to it; you'll be fine.

1
  • 1
    The "config" directory is supposed to be aside the "web" directory. Simply be sure your Drupal 8 has write access to the "config" directory and you'll go rock and roll.
    – Augusto
    Commented Sep 7, 2018 at 8:03
4

I just came across this problem with a Drupal 8.3 installation. Drupal couldn't create a directory outside the public web folder (web, when you install with Composer) due to permission settings.

Create the config and config/sync directories in Drupal composer directory (../web).

1

The path to the directory is to be created to related to the web root of your D8 installation.

In your scenario: you are on https://myd8/core/install.php, executing the script "../web/core/install.php". Please be sure your D8 has wite permission to the "../config" directory.

From the command line point of you, you need to have something like:

a@mydebian ~/Public/d8_composer $ ll
total 372
drwxrwxr-x  7 a a   4096 set  7 09:48 ./
drwxr-xr-x 26 a a   4096 set  7 08:52 ../
-rw-rw-r--  1 a a   2378 set  7 09:07 composer.json
-rw-rw-r--  1 a a 288832 set  7 09:08 composer.lock
drwxrwxrwx  3 a a   4096 set  7 09:48 config/
drwxrwxr-x  4 a a   4096 set  7 08:52 drush/
-rw-rw-r--  1 a a    357 set  7 08:57 .editorconfig
-rw-rw-r--  1 a a    746 set  7 08:52 .env.example
-rw-rw-r--  1 a a   3858 set  7 08:57 .gitattributes
-rw-rw-r--  1 a a    466 set  7 08:52 .gitignore
-rw-rw-r--  1 a a  18046 set  7 08:52 LICENSE
-rw-rw-r--  1 a a    414 set  7 08:52 load.environment.php
-rw-rw-r--  1 a a    481 set  7 08:52 phpunit.xml.dist
-rw-rw-r--  1 a a   6502 set  7 08:52 README.md
drwxrwxr-x  3 a a   4096 set  7 08:52 scripts/
-rw-rw-r--  1 a a   1875 set  7 08:52 .travis.yml
drwxrwxr-x 51 a a   4096 set  7 09:08 vendor/
drwxrwxr-x  7 a a   4096 set  7 08:57 web/
a@mydebian ~/Public/d8_composer $ 

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