By truth.now.forever on
I am having this configuration directory sync error and it's aggravating. Is there anyone who can help me solve this problem?
I've changed permissions and copied settings.php files and everything. Nothing.
I am having this configuration directory sync error and it's aggravating. Is there anyone who can help me solve this problem?
I've changed permissions and copied settings.php files and everything. Nothing.
Comments
Before installing Drupal
Before installing Drupal instance create files folder give permission 777 with recursive if you are using linux then command should be like
,After doing this your configuration problem will be resolved
so I sudo chmod all the things
Well not literally.
I had to rethink what I did. Even specifiying the rewrite conditions for my DocumentRoot on Apache's config file. I chmod 644 my settings.php, chmod 755 my sites directory, did your chmod 777 sites/default/files directory.
I'm still getting the config error.
I don't want to give up installing drupal on my laptop (it's for a project). If I can find a drupal client to develop my drupal pages, that's fine, but I did everything from the drupal instructions to the stackoverflow suggestions and I'm still getting the config error.
Apparently, this could be fixed in an upcoming release
the only way I had to ease this bug was to create the directory specified.
It didn't work, but upon reading [this update](https://www.drupal.org/node/2783749), I'd have to try the update.
Changing the storage location of the sync directory
what you need to do is make few changes on settings.php file
$config_directories = array(
CONFIG_SYNC_DIRECTORY => 'sites/default/files',
);
On production sites, and if your account has permission to do so, it's a good idea to move the configuration sync directory outside of the webroot entirely. As your sync directory should be under version control, this means having your version control repository's root be one level higher than your webroot. please check out more details at https://www.drupal.org/docs/8/configuration-management/changing-the-storage-location-of-the-sync-directory
I had the same problem today
I had the same problem today and thanks for all replies that could help me in searching solution.
It seems that ../config/sync is only a temporary folder created for the conception of the Drupal site because there is, then, not yet database affected. So the install.php use this folder (config/sync) to store the datas permitting the site to be created.
If we observe the path, we see the .. before the path ../config/sync.
In fact, this folder is created at the same level of the site root.
So, we just need to agree writting permission for the folder containig the site folder.
If using Composer to install Drupal, the package create a some_dir folder that contains the .composer folder and the web/ folder containing the site.
So we need to give a chmod -R 777 some_dir/
May be it could be better settings than 777.
It was the solution for me. Hope that could help.
It is not recommended to make
It is not recommended to make the whole web folder writable for everybody, and particularly for the apache user (CentOS, or www-data user in Ubuntu). The exception is the file directory, which should be writable for apache in order to upload files.
A good practice is to put this directory out of the webroot. The problem is that doing so, apache does not have permissions to write there and the directory should be created manually. See this article for more info.
So, to solve this issue in case you are the sysadmin and have access to the whole server, just create manually the directory config/sync at the same level of the webroot directory, and this will just work. For instance if you are installing drupal in /var/www/drupal by means of composer, your webroot will be something like /var/www/drupal/web . You can just 'mkdir -p /var/www/drupal/config/sync/' and this will solve the issue.
This one worked for me.
This one worked for me.
This worked for me :)
This worked for me :)
For those who need a solution ...
Here's what worked for me. Hopefully it helps someone else.
I just ran into this by installing and updating the drupal-composer/drupal-project project, then using the Web UI to install.
Not so smooth ... the error says "The directory '../config/sync' does not exist" and no additional information on where this folder goes or how it relates to installation. You are blocked from installing Drupal at this point.
This could be specific to "drupal-composer/drupal-project" and maybe not a download-zip-and-install process - I don't do those anymore so I wouldn't know for sure.
Project supplies its own settings.php file, which doesn't work wrt creating this so-called config/sync folder (really, the error should be clear WHERE this folder should reside ... arcane errors do no one any favors and add to the overall frustration and confusion the Drupal community faces at present)
The link @truth.now.forever recommends does give you some hint, but once again falls short of matching a solution for the error I see when trying to do a basic installation of Drupal.
Solution:
- Go to (drupal project folder is named "drupal/" in this example) ... "drupal/web/sites/default" (note that some distributions use 'docroot' instead of 'web', and I've seen some ppl use 'www' for this folder as well)
- Once in 'default' folder, make sure 'files/' folder is either owned by _www/apache process OR your user account are in same account 'group' OR 'chown -R 777 files'.
- If there's a settings.php file there (from the distribution or composer project) DELETE IT.
- Re-copy 'default.settings.php' to 'settings.php' and make sure it, too, is writable by the _www/apache user using the same logic applied to 'files' folder. In this case, I just make the settings.php file 777 and once install is complete, I change it back to a 755.
- Return to your domain root (or app root if you're serving as a subfolder) and re-run installation. It should work this time.
What I got as a result was the following folder:
drupal/web/sites/default/files/config_zheRoOwoBuIPeA6QKPmfj6X6ZDcBI-0MgImlLrxEpkklFZ8TkiC-Uv_yABNBJqyueET6dhLZqQ/sync
and there's a README.txt file in it:
"This directory contains configuration to be imported into your Drupal site. To make this configuration active, visit admin/config/development/configuration/sync. For information about deploying configuration between servers, see https://www.drupal.org/documentation/administer/config"
Above worked for me
Thanks ccshannon. Did try your workaround and it seemed to do the thing just fine.
No problemo
Glad it worked, @mvpfi. Cheers! :)
It is recommend to have config outside of the public web folder
As it said here https://drupal.stackexchange.com/a/233459/55010 It is recommend to have config outside of the public web folder.
For people using composer drupal-project template to install drupal this issue is also in drupal-composer github https://github.com/drupal-composer/drupal-project/issues/274
Good point!
Thanks, @qpro ... that is indeed the recommended way, which of course is in conflict with composer-installed drupal-project, which is also the recommended way to install Drupal. Unfortunately, there is nothing in the README.md file for drupal-project about correcting this. It requires a manual change and should be documented.
So, to do this, after making the error go away, one must both create or move the config_XXXXXXXetc/sync folder to 'project root' (the folder with the composer.json in it) and name it "config/sync" , make sure it is writable by the web server, then edit the site's settings.php file (e.g. sites/default/settings.php or whichever sites/ subfolder you are using) to say ...
This worked for me, at least.
Me also
Just changing settings.php with the code you provided worked for me. Thanks!
This works
This works for me too..
Thanks
Thank you very much. Worked for me
HI, just create the pass that
HI, just create the path that drupal system need it!
ex: create your error message path site/defaults/files/config_blablablabla/sync
and system will create a htaccess file and its needs
100% it works
Just for non-experienced users
That is a good solution, it works and is fine. But for a more complex development, you should put it outside the web directory.
wow you are right! This
@Bob_robinson wow you are right! This totally made my drupal update work for me! amazing. best simple sollution!
This is the easiest way to solve it
1. Go on your settings.php which is located in this directory /web/sites/default/settings.php
2. Comment these codes $config_directories['sync'] = '../config/sync'; which is located at the bottom of file.
3. Reload your page.
Hope that could help.
configuration directory sync error
There is a simple way to solve "configuration directory sync error"
settings.phpfiledefault.settings.phptosettings.phpThis works for me!
Suggest to ignore the bad advice above!
The only good advice is to match your environment with its configuration!
- Only use 777 to confirm you have a configuration issue, which needs to be fixed properly. Which means you shouldn't leave the 777.
- Apply changes of default.settings.php to settings.php using a three way compare. Your settings.php is unique for your site and based in the default.settings.php when created. Replacing settings.php with default.settings.php makes you lose configuration details for your site. It simply doesn't work that way. Compare old default.settings.php with new default.settings.php and consider applying the differences to settings.php.
- The objective should be to have a properly configured installation. The objective is not to remove the message for status page. You should fix your environment so it doesn't report those errors instead of suppressing them
Suggest to be prepared for the change in D8.8: https://www.drupal.org/node/3018145
Recreate the folder
I couldn't dream of setting my entire Drupal file system to 777 for such a minor issue.
Deleting and re-creating the folder in the same D8 docroot 1 level above the web folder where the config folder currently exists worked for me...
sudo rm -rf configmkdir -p config/syncnot installing drupal
I don't want to give up installing drupal on my laptop
You can see previous
You can see previous solutions.
I run into this error too and here is what i did.
I read all the above comments and first none worked.
1) I was installing drupal-8 via the "quickstart" way suggested in /drupal_docroot/core/INSTALL.txt which is like the following with some options such as profile etc:
php core/scripts/drupal quick-start -v --site-name mysiteName -- minimal
After it failed with the same error reported here, i switched to drush site install.
2) drush site install
drush -r /var/www/html/drupal8-docroot -l http://d8.example.com site-install minimal --db-url=mysql://db_username:db_passwd@localhost/db-name -y
Then it failed again pointing to the same error "failed to create something...in ../config/sync".
So, then i carefully did the following which worked (have no idea why)
-studied the permissions in /docroot/sites/mysite/.... (nothing seem out of place as both my user and webserver had read/write/execute)
- removed the /...files/ folder because i noticed some "dot dot" directories under it with sync sub-folder as well.
- removed the settings.php file and copied it again from /default/default.settings.php to settings.php
Then re-tried the drush site install above and it worked.
Bottom line is: try different things and keep eye on the permissions after each operation!
Just create config directory under drupal root
Just create a directory with name "config" under your drupal installation project (root). Inside config folder create another folder named as "sync". Give 777 permission to config folder.
sudo chmod -R 777 config. This will solve the issue. Happy coding.
A directory under drupal root
A config directory under drupal root with permissions set to 777? Are you trying to be funny? Because you're not. On what planet is this remotely a good idea??
Thanks kindly
This worked for me. Thanks, Mate.