Grant write permissions on configuration file

Last modified: October 12, 2008 - 15:04

Drupal comes with a default.settings.php file in the sites/default directory. Before running the installer you need to make a copy of this file, in sites/default, naming it "settings.php." (NOTE: do not rename the default file, copy it instead. Drupal needs the default.settings.php file to exist.) You should have both a default.settings.php and settings.php file in your sites/default directory. Drupal's installer will modify the settings.php file as needed with the details you provide during the installation process.

After creating the new file you must insure that it is writable. You can assign write permissions to it with the command (from the installation directory):

chmod a+w sites/default/settings.php
or
chmod 777 sites/default/settings.php

Drupal should set the file permissions back to read-only once the installation is done. You should make sure this is the case and manually change it yourself if it didn't happen. You can use the same command, slightly modified, to remove write permission:

chmod a-w sites/default/settings.php
or
chmod 555 sites/default/settings.php

Note
On a Windows system this would be Change permission and make sure the file is not marked Read Only before running the installer and then set it back to Read Only after.

 
 

Drupal is a registered trademark of Dries Buytaert.