I am working on drupal commons, and using pantheon servers for hosting. The major problem I am facing is the server database config issues. I am not able to change the settings.php file. Also Pantheon every now and then changes their db server password. How can I control this ? is there any server variable for the db instance, port, user id, password ?


Drupal removes "write" permission from settings.php, so to edit it, you need to give this permission back.


chmod u+w sites/default/settings.php

FTP, SFTP and alike

Use your cilent, and just tick appropriate checkbox. Like this:


  • Note that screenshot is from my dev machine, so "read" for "Others" is not an issue. Pretty much all people with access to it can su if needed anyway. – Mołot Dec 19 '14 at 8:43

Pantheon does not require any settings.php to operate a Pressflow-based Drupal distribution because all database credentials are injected into server side variables and read by Pantheon Pressflow core. In fact, Pantheon ignores file-based permissions while Drupal checks these and may sometimes complain. If you are unable to alter a file in your code base, you should ensure your Connection Mode is toggled to "SFTP" instead of "Git" because you will not have SFTP write access while the code is controlled by Git version control. The toggle is available on the Pantheon Dashboard of the development environment of your site.

You should also be aware that Pantheon does not support the Drupal Commons distribution as it is not Pantheon Pressflow based and cannot read the environment variables we inject on the fly, such as database credentials. To accomplish what you're trying to do, you will need to merge the Commons code base with Pantheon Pressflow Drupal and receive core updates from the Pantheon upstream. Simply downloading a distro tarball from Drupal.org and installing it on pantheon will not work, and is absolutely not supported on the platform.

Sources: Developing on Pantheon directly with SFTP mode

Adding a Custom Upstream

Running a Custom Upstream on Pantheon

Reading Pantheon Environment Configuration

  1. Copy the file setting.php and paste them in same folder
  2. Rename that folder like setting1.php.
  3. Now you can change that file and user db name,apssword.
  4. Rename that original settings.php as originalsettings.php.
  5. Now you can rename that setting1.php file as settings.php.

now its working fine now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.