I am getting an error when I change the permissions on the settings.php file JUST after installation. The error shows the Install screen and says "Select and installation profile", with this error:

"Warning: include_once(/var/www/vhosts/girlzone.com/httpdocs/sites/default/settings.php): failed to open stream: Permission denied in drupal_settings_initialize() (line 712 of /var/www/vhosts/girlzone.com/httpdocs/includes/bootstrap.inc)."

I install Drupal, following the directions of the Installation Guide. I then go to the Drupal dashboard, and everything looks fine. So I change the permissions on the settings.php file, and then I get bumped to the install page, with the error message. I cannot get back to the dashboard, and I cannot re-do the installation after I change the settings.php back to install permissions. I have to erase everything and start over from scratch after rebuilding my VPS.

I have tried this 3 times, and the same thing has happened 3 times.

Pic of error here:
http://www.birnamwoodgames.com/drupalError.jpg

Comments

heine’s picture

settings.php must be readable by the webserver user.

mattbrand’s picture

I am setting the permissions to settings.php as per the Installation Guide:

"4. Please note: Do not forget to change permissions back after you have run the installation script. Those permissions should be:
chmod 640 settings.php
chmod 755 ../default"

Is that not correct?

mattbrand’s picture

OK, that was it. I had to have the settings.php owned by the webserver user, apache.

Thanks!