Closed (fixed)
Project:
Drush
Version:
All-versions-4.x-dev
Component:
PM (dl, en, up ...)
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
8 Sep 2011 at 16:40 UTC
Updated:
9 Jun 2012 at 22:11 UTC
I am having trouble running drush up to update views. This looks like a permissions error but I cannot tell where drush is trying to write to.
#drush -d @site up
.
.
Downloading release history from [notice]
http://updates.drupal.org/release-history/drush/7.x [9.91 sec, 42.58
MB]
Executing: wget 'http://updates.drupal.org/release-history/drush/7.x'
--2011-09-08 16:32:28-- http://updates.drupal.org/release-history/drush/7.x
Resolving updates.drupal.org... 140.211.166.21, 140.211.166.6
Connecting to updates.drupal.org|140.211.166.21|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14752 (14K) [text/xml]
7.x: Permission denied
Cannot write to `7.x' (Permission denied).
Executing: curl -O 'http://updates.drupal.org/release-history/drush/7.x'
Warning: Failed to create the file 7.x
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
16 14752 16 2403 0 0 14852 0 --:--:-- --:--:-- --:--:-- 14852
curl: (23) Failed writing body
simplexml_load_file(): I/O warning : failed to load external entity [warning]
"" pm.drush.inc:2103 [11.41 sec, 42.58 MB]
Calling unlink(Object) [11.41 sec, 42.59 MB] [debug]
unlink(): No such file or directory drush.inc:1216 [11.41 sec, 42.59 [warning]
MB]
Could not download project status information from [error]
http://updates.drupal.org/release-history/drush/7.x [11.41 sec, 42.59
MB]
Undefined index: drush drush.inc:202 [11.41 sec, 42.59 MB] [notice]
Invalid argument supplied for foreach() drush.inc:202 [11.41 sec, [warning]
42.59 MB]
drush self-update check: drush 4.5 is up-to-date. [11.41 sec, 42.59 [notice]
MB]
Code updates will be made to the following projects: Views [views-7.x-3.x-dev]
Note: A backup of your project will be stored to backups directory if it is not managed by a supported version control system.
Note: If you have made any modifications to any file that belongs to one of these projects, you will have to migrate those modifications after updating.
Do you really want to continue with the update process? (y/n): n
Aborting. [13.87 sec, 42.59 MB] [cancel]
Changes made in drush_pm_updatecode have been rolled back. [13.88 [rollback]
sec, 41.41 MB]
Command dispatch complete [13.88 sec, 41.36 MB] [notice]
Timer Cum (sec) Count Avg (msec)
page 13.617 1 13616.72
Peak memory usage was 43.28 MB [13.88 sec, 41.35 MB] [memory]
Comments
Comment #1
greg.1.anderson commentedThere are a few issues in the queue right now on drush temp file usage:
http://drupal.org/node/1234904
http://drupal.org/node/1168812
http://drupal.org/node/966378
http://drupal.org/node/1272820
I can't support permission denied errors directly; I'm swamped right now. If you have patches to submit that make it easier to control or diagnose temp file usage, your help in the issue queue would be most appreciated.
Sorry for any inconvenience drush is causing you in its temp directory selection.
Comment #2
waverate commentedWell, reading those issues helped a lot.
It looks like drush needs to write to drupal root. The subtlety that I did not notice previously, is that the required write permissions are not for the webserver user (apache) but for the user running drush.
Because drush does not have to be run from drupal root, the error:
is quite vague. Perhaps adding a full path to the error message (at least in debug) would help identify the problem sooner.
SOLUTION
- give the user running drush write permission to the drupal root directory
Comment #3
jonhattan@waverate that shouldn't be the solution.
To confirm, just seen that:
Comment #4
jonhattanCommitted a fix: http://drupalcode.org/project/drush.git/commitdiff/0b8e6b2?hp=418b76aa09...
Comment #5
jonhattanComment #6
msonnabaum commentedBackported.