when you must use an alternate TMP dir for drupal, drush wont use it.
drush dl views
Project views (7.x-3.0-beta3) downloaded to [success]
/home/expresso/d7/sites/all/modules/views.
Project views contains 3 modules: views_export, views, views_ui.
WD php: Warning: file_put_contents(/tmp/cache.inc): failed to open [warning]
stream: Permission denied in drush_pm_put_extension_cache() (line
2419 of /home/expresso/drush/commands/pm/pm.drush.inc).
file_put_contents(/tmp/cache.inc): failed to open stream: Permission [warning]
denied in drush_pm_put_extension_cache() (line 2419 of
/home/expresso/drush/commands/pm/pm.drush.inc).
expresso@expressogalz.com [~/www/cms]#
Comments
Comment #1
moshe weitzman commentedsetup your desired tmp dir in php.ini, and not just drupal. we can't rely on drupal for this as we don't bootstrap for many requests.
Comment #2
jwilson3I ran into this issue on a shared hosting environment. It turned out that /tmp/cache.inc file was previously created by a different user, and so I couldn't delete or change the file.
Unfortunately, my attempts to customize the tmp directory location using
ini_set('upload_tmp_dir')failed; I tried adding the line to both drushrc.php and at the top of the drush.php executable to no avail.I've contacted the hosting support about the issue as well.
UPDATE: the hosting provider deleted the file for me, but this doesnt mean that it wont happen for somebody else later on the server.
Comment #3
jwilson3@moshe:
What is drush's stance on supporting shared hosted environments?
Should drush at least check to see if a file exists / has permission before it writes to a shared temp location?
Comment #4
greg.1.anderson commentedWhile I did not re-check to verify that drush handles /tmp correctly in all other places, the specific symptom described here was caused by a tragic bit of code that was never really finished and should not have been committed in the first place. It was backed out of 5.x-dev in #1049660: remove hardcoded drush pm extension cache, and is waiting to be backported to 4.x-dev.
Comment #5
greg.1.anderson commentedUntil 4.5 is available, as a workaround, if you are working in a shared environment, create /tmp/cache.inc and make it world-writable. Then get something strong to wash the bad taste out of your mouth with. (Sorry, this one was mine.)
Comment #6
jwilson3LOL. thanks for the follow up, and the laugh.
Comment #7
q0rban commentedsubscribe
Comment #8
greg.1.anderson commentedClosed as duplicate per #4. Re-open if symptoms do not clear up after other patch applied.