I can't login as user admin / password admin after a Drupal 7 drush site-install

I'm using drush-All-Versions-HEAD.
I'm using drupal-7.0-rc2.
I am running Debian as a guest OS on Win 7 in VMWare Player.

My installation steps are:

drush dl drupal-7.0-rc2 --drupal-project-rename=public_html
cd public_html
drush si -y --db-url=mysql://root:boating@localhost/ph_dev --site-name=Dorf --debug

I can do a traditional installation from the browser, but I do get the error:

"The directory sites/default/files does not exist. An automated attempt to create this directory failed, possibly due to a permissions problem. To proceed with the installation, either create the directory and modify its permissions manually or ensure that the installer has the permissions to create it automatically. For more information, see INSTALL.txt or the online handbook."

and have to create the files directory manually. Perhaps I have some kind of permission problem? I am running this process as a regular user.

The full output is below.





phil@debian:~$ pwd
/home/phil
phil@debian:~$ sudo rm -rf public_html
phil@debian:~$ drush dl drupal-7.0-rc2 --drupal-project-rename=public_html
Project drupal (7.0-rc2) downloaded to /home/phil/public_html.                                             [success]
Project drupal contains:                                                                                   [success]
 - 3 profiles: standard, testing, minimal
 - 4 themes: bartik, garland, seven, stark
 - 47 modules: drupal_system_listing_compatible_test, drupal_system_listing_incompatible_test, image,
update, comment, profile, filter, simpletest, field_ui, user, statistics, taxonomy, dblog, blog, tracker,
help, file, overlay, openid, book, syslog, php, forum, number, list, text, options, field_sql_storage,
field, toolbar, locale, contextual, system, translation, dashboard, trigger, path, menu, shortcut, block,
aggregator, contact, rdf, poll, color, node, search

phil@debian:~$ cd public_html


phil@debian:~/public_html$ drush si -y --db-url=mysql://root:boating@localhost/ph_dev --site-name=Dorf --debug
Bootstrap to phase 0. [0.01 sec, 1.24 MB]                            [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drush() [0.01 sec, 1.38 MB] [bootstrap]
Bootstrap to phase 1. [0.03 sec, 3.15 MB]                                                                  [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.03 sec, 3.15 MB]                                 [bootstrap]
Initialized Drupal 7.0-rc2 root directory at /home/phil/public_html [0.04 sec, 4.11 MB]                       [notice]
Found command: site-install (commandfile=core) [0.04 sec, 4.12 MB]                                         [bootstrap]
Initializing drush commandfile: user [0.05 sec, 4.12 MB]                                                   [bootstrap]
You are about to create a sites/default/files directory and create a sites/default/settings.php file and DROP your 'ph_dev' database and then CREATE a new one. Do you want to continue? (y/n): y
Sites directory sites/default already exists - proceeding. [0.05 sec, 4.13 MB]                                [notice]
Calling copy(sites/default/default.settings.php, sites/default/settings.php)
Calling mkdir(sites/default/files)
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.05 sec, 4.14 MB]                                 [bootstrap]
Initialized Drupal site default at sites/default [0.05 sec, 4.14 MB]                                          [notice]
Calling system(mysql  --database=information_schema --host=localhost --user=root --password=boating --execute='DROP DATABASE IF EXISTS `ph_dev`');
Calling system(mysql  --database=information_schema --host=localhost --user=root --password=boating --execute='CREATE DATABASE `ph_dev`');
Starting Drupal installation. This takes a few seconds ... [0.14 sec, 4.43 MB]                             [ok]
WD system: user module installed. [0.86 sec, 11.32 MB]                                                          [info]
WD system: user module enabled. [0.86 sec, 11.33 MB]                                                            [info]
WD system: node module installed. [1.06 sec, 13.19 MB]                                                          [info]
WD system: node module enabled. [1.07 sec, 13.2 MB]                                                             [info]
WD system: filter module installed. [1.17 sec, 13.53 MB]                                                        [info]
WD system: filter module enabled. [1.17 sec, 13.53 MB]                                                          [info]
WD system: field_sql_storage module installed. [1.24 sec, 13.67 MB]                                             [info]
WD system: field_sql_storage module enabled. [1.24 sec, 13.68 MB]                                               [info]
WD system: field module installed. [1.36 sec, 14.43 MB]                                                         [info]
WD system: field module enabled. [1.37 sec, 14.43 MB]                                                           [info]
WD system: text module installed. [1.46 sec, 14.54 MB]                                                          [info]
WD system: text module enabled. [1.46 sec, 14.54 MB]                                                            [info]
WD field: Updating field type text with module text. [1.46 sec, 14.55 MB]                                     [notice]
WD field: Updating field type text_long with module text. [1.46 sec, 14.55 MB]                                [notice]
WD field: Updating field type text_with_summary with module text. [1.46 sec, 14.55 MB]                        [notice]
WD system: block module installed. [1.56 sec, 14.74 MB]                                                         [info]
WD system: block module enabled. [1.56 sec, 14.74 MB]                                                           [info]
WD system: color module installed. [1.65 sec, 14.92 MB]                                                         [info]
WD system: color module enabled. [1.65 sec, 14.92 MB]                                                           [info]
WD system: comment module installed. [1.78 sec, 15.45 MB]                                                       [info]
WD system: comment module enabled. [1.78 sec, 15.45 MB]                                                         [info]
WD system: contextual module installed. [1.87 sec, 15.47 MB]                                                    [info]
WD system: contextual module enabled. [1.87 sec, 15.47 MB]                                                      [info]
WD system: dashboard module installed. [1.96 sec, 15.6 MB]                                                      [info]
WD system: dashboard module enabled. [1.96 sec, 15.6 MB]                                                        [info]
WD system: dblog module installed. [2.06 sec, 15.64 MB]                                                         [info]
WD system: dblog module enabled. [2.06 sec, 15.64 MB]                                                           [info]
WD system: field_ui module installed. [2.16 sec, 15.73 MB]                                                      [info]
WD system: field_ui module enabled. [2.16 sec, 15.73 MB]                                                        [info]
WD system: file module installed. [2.27 sec, 16.08 MB]                                                          [info]
WD system: file module enabled. [2.27 sec, 16.08 MB]                                                            [info]
WD field: Updating field type file with module file. [2.27 sec, 16.09 MB]                                     [notice]
WD system: options module installed. [2.37 sec, 16.15 MB]                                                       [info]
WD system: options module enabled. [2.37 sec, 16.15 MB]                                                         [info]
WD system: taxonomy module installed. [2.5 sec, 16.48 MB]                                                       [info]
WD system: taxonomy module enabled. [2.5 sec, 16.49 MB]                                                         [info]
WD field: Updating field type taxonomy_term_reference with module taxonomy. [2.51 sec, 16.49 MB]              [notice]
WD system: help module installed. [2.6 sec, 16.51 MB]                                                           [info]
WD system: help module enabled. [2.61 sec, 16.51 MB]                                                            [info]
WD system: image module installed. [2.73 sec, 16.8 MB]                                                          [info]
WD system: image module enabled. [2.73 sec, 16.8 MB]                                                            [info]
WD field: Updating field type image with module image. [2.73 sec, 16.8 MB]                                    [notice]
WD system: list module installed. [2.84 sec, 16.89 MB]                                                          [info]
WD system: list module enabled. [2.84 sec, 16.89 MB]                                                            [info]
WD field: Updating field type list with module list. [2.84 sec, 16.9 MB]                                      [notice]
WD field: Updating field type list_boolean with module list. [2.84 sec, 16.9 MB]                              [notice]
WD field: Updating field type list_number with module list. [2.84 sec, 16.9 MB]                               [notice]
WD field: Updating field type list_text with module list. [2.84 sec, 16.9 MB]                                 [notice]
WD system: menu module installed. [2.96 sec, 17.03 MB]                                                          [info]
WD system: menu module enabled. [3.63 sec, 18.29 MB]                                                            [info]
WD system: number module installed. [3.73 sec, 18.38 MB]                                                        [info]
WD system: number module enabled. [3.73 sec, 18.38 MB]                                                          [info]
WD field: Updating field type number_integer with module number. [3.73 sec, 18.39 MB]                         [notice]
WD field: Updating field type number_decimal with module number. [3.74 sec, 18.39 MB]                         [notice]
WD field: Updating field type number_float with module number. [3.74 sec, 18.39 MB]                           [notice]
WD system: overlay module installed. [3.84 sec, 18.5 MB]                                                        [info]
WD system: overlay module enabled. [3.85 sec, 18.5 MB]                                                          [info]
WD system: path module installed. [3.95 sec, 18.56 MB]                                                          [info]
WD system: path module enabled. [3.95 sec, 18.56 MB]                                                            [info]
WD system: rdf module installed. [4.07 sec, 18.69 MB]                                                           [info]
WD system: rdf module enabled. [4.07 sec, 18.69 MB]                                                             [info]
WD system: search module installed. [4.21 sec, 18.9 MB]                                                         [info]
WD system: search module enabled. [4.21 sec, 18.91 MB]                                                          [info]
WD system: shortcut module installed. [4.33 sec, 19.03 MB]                                                      [info]
WD system: shortcut module enabled. [4.34 sec, 19.03 MB]                                                        [info]
WD system: toolbar module installed. [4.45 sec, 19.09 MB]                                                       [info]
WD system: toolbar module enabled. [4.45 sec, 19.09 MB]                                                         [info]
WD system: standard module installed. [5.29 sec, 21.42 MB]                                                      [info]
WD system: standard module enabled. [5.29 sec, 21.42 MB]                                                        [info]
WD actions: Action 'Publish comment' added. [5.84 sec, 21.2 MB]                                               [notice]
WD actions: Action 'Unpublish comment' added. [5.84 sec, 21.2 MB]                                             [notice]
WD actions: Action 'Save comment' added. [5.84 sec, 21.2 MB]                                                  [notice]
WD actions: Action 'Publish content' added. [5.84 sec, 21.2 MB]                                               [notice]
WD actions: Action 'Unpublish content' added. [5.84 sec, 21.2 MB]                                             [notice]
WD actions: Action 'Make content sticky' added. [5.85 sec, 21.2 MB]                                           [notice]
WD actions: Action 'Make content unsticky' added. [5.85 sec, 21.2 MB]                                         [notice]
WD actions: Action 'Promote content to front page' added. [5.85 sec, 21.2 MB]                                 [notice]
WD actions: Action 'Remove content from front page' added. [5.85 sec, 21.2 MB]                                [notice]
WD actions: Action 'Save content' added. [5.86 sec, 21.21 MB]                                                 [notice]
WD actions: Action 'Ban IP address of current user' added. [5.86 sec, 21.21 MB]                               [notice]
WD actions: Action 'Block current user' added. [5.86 sec, 21.21 MB]                                           [notice]
WD system: update module installed. [6.43 sec, 22.69 MB]                                                        [info]
WD system: update module enabled. [6.43 sec, 22.69 MB]                                                          [info]
WD user: Session opened for admin. [6.52 sec, 22.95 MB]                                                       [notice]
WD cron: Cron run completed. [7.29 sec, 22.75 MB]                                                             [notice]
Command dispatch complete [7.3 sec, 22.73 MB]                                                                 [notice]
 Timer  Cum (sec)  Count  Avg (msec)
 page   7.154      1      7154.36

Peak memory usage was 24.53 MB [7.3 sec, 22.73 MB]                                                            [memory]

phil@debian:~/public_html$ drush status
 Drupal version                :  7.0-rc2
 Site URI                      :  http://default
 Database driver               :  mysql
 Database hostname             :  localhost
 Database username             :  root
 Database name                 :  ph_dev
 Database                      :  Connected
 Drupal bootstrap              :  Successful
 Drupal user                   :  Anonymous
 Default theme                 :  bartik
 Administration theme          :  seven
 PHP configuration             :  /etc/php5/cli/php.ini
 Drush version                 :  4.0-dev
 Drush configuration           :
 Drush alias files             :
 Drupal root                   :  /home/phil/public_html
 Site path                     :  sites/default
 File directory path           :  sites/default/files
 Private file directory path   :

phil@debian:~/public_html$ drush st uinf admin --full
 Administration theme   :  seven

Comments

Phil.Hersh’s picture

Priority: Normal » Minor

I'm troubleshooting this and I am almost certain it is a permission problem. Drush from the command line as a user has different file permissions than apache does in my www directories.

moshe weitzman’s picture

Category: bug » support
Status: Active » Fixed

to fix that you typically wither add yourself to the web user group or change to the webserver user: sudo -u apache drush ...

Phil.Hersh’s picture

Category: support » bug
Status: Fixed » Active

Thanks, Moshe I'll check it out.

I'm trying to develop a recipe that will let me build a drupal development environment on my Windows 7 machine quickly and easily.

I have created two identical sites, yet one runs properly and the other one fails to run.

The site installed with Drush site install won't let me log in.

Here are the steps that I followed to install both, up until the step where I used a web install for one site and a Drush site install for the other.

Install VMware player.

Download Debian ISO squeeze.

Install Debian.

Install MySQL, Apache, PHP.

Tune MySQL memory, tune PHP memory.

Install needed PHP packages.

Download and install Drush.

Add user to group www–data.

Create two Apache virtual machines pointing to two different directories under my user account

Download Drupal 7-rc2.

Install one site with standard Drupal install in one virtual directory, install other site with Drush site install in the other virtual directory.

The site installed using standard Drupal install lets me login. The site installed with Drush site install, won't let me login. I type admin admin and I get bounced back to the original login page.

jonhattan’s picture

Status: Active » Postponed (maintainer needs more info)

a tipycal reason you can't login is because you haven't enabled rewrite module for apache (and it seems `drush si` enable clean urls always).

OTOH your second command in #0 is wrong. Use drush uinf admin --full (without st)

DjebbZ’s picture

Version: » 7.x-4.5

I confirm that having the rewrite module disabled for apache prevents login after a successful install. I noticed the same problem today, retried a drush si, then enabled the rewrite module in apache and reinstalled a drupal with drush si. I can now login normally. Should it be fixed or documented inline ? Or both ?

My configuration : latest Debian Squeeze in a VBox under Windows XP. Installing Drupal 7.8 with Drush 7-x.4.5.

stuzog’s picture

Same problem with clean URLS enabled on OS X MAMP setup, see http://drupal.org/node/1178502#comment-6875474

stuzog’s picture

Solution: drush uli gives a one-time login link that enables a password reset.

greg.1.anderson’s picture

Version: 7.x-4.5 » 8.x-6.x-dev
Status: Postponed (maintainer needs more info) » Closed (won't fix)
Issue tags: +Needs migration

This issue was marked closed (won't fix) because Drush has moved to Github.

If desired, you may copy this bug to our Github project and then post a link here to the new issue. Please also change the status of this issue to closed (duplicate).

Please ask support questions on Drupal Answers.