[SOLVED][Drupal Errors] Warning: fopen(./sites/default/settings.php) [function.fopen]

| | 1 min read

Many Drupal programmers, Drupal site admins and Drupal site users have encountered errors similar to "Warning: fopen(./sites/default/settings.php) [function.fopen]" in their Drupal site. If you are facing the same situation in your Drupal site then read on to find out the solution.

This error which occurs during Drupal installation is due to a misconfigured file/folder read & write permissions. Follow the steps below to fix the issue.

  • We need to the need change the permissions of a few files using an FTP tool or shell utilities.
  • Change the permission of the following file CHMOD to 777
    .../sites/default/default.settings.php
  • Change the following file CHMOD to 777
    .../sites/default/settings.php
  • Next set the following folder CHMOD to 777
    .../sites/default
  • After installation reset the permissions as follows
  • Change the following file CHMOD to 700.
    .../sites/default/default.settings.php
  • Make the following file CHMOD to 744.
    .../sites/default/settings.php
  • Finally alter the following folder CHMOD to 755.
    .../sites/default

Hope that helps.

The easiest way to solve a Drupal issue is to hand it to the Drupal experts. We can provide a wide range of Drupal services to help you maintain and manage your Drupal websites. Get in touch with us to know more.

Reference: http://drupal.org/node/735648 & http://drupal.org/node/735642