diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index 214ce28..b683347 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -2010,6 +2010,28 @@ function install_check_requirements($install_state) { ); } } + + // Check that the services.yml file is read and writable. + $yml_file = $conf_path . '/services.yml'; + $readable = drupal_verify_install_file($yml_file, FILE_READABLE); + $writable = drupal_verify_install_file($yml_file, FILE_WRITABLE); + + if (!$readable) { + $requirements['services file readable'] = array( + 'title' => t('Services file'), + 'value' => t('The services.yml file is not readable.'), + 'severity' => REQUIREMENT_ERROR, + 'description' => t('@drupal requires read permissions to %file at all times. If you are unsure how to grant file permissions, consult the online handbook.', array('@drupal' => drupal_install_profile_distribution_name(), '%file' => $yml_file, '@handbook_url' => 'http://drupal.org/server-permissions')), + ); + } + if (!$writable) { + $requirements['service file writable'] = array( + 'title' => t('Services file'), + 'value' => t('The service.yml file is not writable.'), + 'severity' => REQUIREMENT_ERROR, + 'description' => t('The @drupal installer requires write permissions to %file during the installation process. If you are unsure how to grant file permissions, consult the online handbook.', array('@drupal' => drupal_install_profile_distribution_name(), '%file' => $yml_file, '@handbook_url' => 'http://drupal.org/server-permissions')), + ); + } } return $requirements; }