Grant write permissions on the configuration file
Last modified: June 20, 2009 - 21:02
Drupal uses a configuration file for database information and other special configurations.
Your Drupal download comes with a default configuration file at sites/default/default.settings.php, within the Drupal directory that you downloaded the Drupal files to (following the downloading instructions from the previous page), which needs to be prepared so that the installer can edit it.
- Copy the
default.settings.phptosettings.php. You can do this from the command line usingcp default.settings.php settings.php. NOTE: Do not simply rename the file. The Drupal installer will need both files. - You should now have both a default.settings.php and settings.php file in your
sites/defaultdirectory. - Make the settings file writeable, so that the installer can edit it
chmod a+w sites/default/settings.php
or
chmod 666 sites/default/settings.php
Both commands have the same effect.
Several FTP tools like Filezilla, Transmit, and Fetch allow you to change file permissions, using a 'file attribute' or 'get info' command. In this case the octal or numeric value file permission should be set to 666. - 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 444 sites/default/settings.php. If you are using a FTP tool the permission should be set to 444.
Windows 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. For more information about modifying Windows file permissions, see the Troubleshooting FAQ.
