Hi when trying to download modules i get the following Warning:
SOMESITE@TESTSRV:~/public_html/sites/all/modules/contrib$ drush dl cdn -v
Initialized Drupal 6.20 root directory at /home/SOMESITE/public_html [notice]
Executing: wget --version
Downloading release history from [notice]
http://updates.drupal.org/release-history/cdn/6.x
Executing: mkdir '/tmp/drush_tmp_1301401340'
Downloading project cdn to /tmp/drush_tmp_1301401340 ... [notice]
Calling chdir(/tmp/drush_tmp_1301401340)
Executing: wget -P . 'http://ftp.drupal.org/files/projects/cdn-6.x-2.1.tar.gz'
Downloading cdn-6.x-2.1.tar.gz was successful. [notice]
Calling md5_file(cdn-6.x-2.1.tar.gz)
Md5 checksum of cdn-6.x-2.1.tar.gz verified. [notice]
Executing: gzip -d 'cdn-6.x-2.1.tar.gz'
Executing: tar -xf 'cdn-6.x-2.1.tar'
Calling unlink(cdn-6.x-2.1.tar)
Calling chdir(/home/SOMESITE/public_html)
Using destination directory [notice]
/home/SOMESITE/public_html/sites/all/modules/contrib
Executing: svn info '/home/SOMESITE/public_html/sites/all/modules/contrib'
Executing: bzr root '/home/SOMESITE/public_html/sites/all/modules/contrib'
Calling is_readable(/tmp/drush_tmp_1301401340/cdn)
Calling is_writable(/home/SOMESITE/public_html/sites/all/modules/contrib)
Calling rename(/tmp/drush_tmp_1301401340/cdn, /home/SOMESITE/public_html/sites/all/modules/contrib/cdn)
Project cdn (6.x-2.1) downloaded to [success]
/home/SOMESITE/public_html/sites/all/modules/contrib/cdn.
file_put_contents(/tmp/cache.inc): failed to open stream: Permission [warning]
denied pm.drush.inc:2420
Command dispatch complete [notice]
This is run by a less privileged user, if I run it as root there is no problem. The modules seems to be downloaded and working.
I am hosting Drupal sites and would like to provide drush to my users via ssh.
Comments
Comment #1
anthonyoliver commentedI don't think this is a drush bug, but more a permissions problem on your server.
Check the directory:
/home/SOMESITE/
with:
ls -l
It should show your file permissions. If you are running drush as a user that doesn't have write or execute permissions on that folder then it's probably not going to work out for you.
Comment #2
jonhattanThis is drush with a hardcoded path.
Comment #3
beermann commentedThe user does have full access for the folder so that is not the problem.
Comment #4
beermann commentedHardcoded could be a problem
Comment #5
bbjay commentedI have encountered the same problem. I am new to drush, but it seems to occur when you use drush with one user, then switch users to use drush on a different site as a different user. When I look in the /tmp folder, I find the cache.inc file located there with user1/user1 permissions for owner/group. This causes owner2 to not be able to use cache.inc. Is there a way for this to be changed so that cache.inc will be put and used in /home/USER1/tmp/cache.inc? That would ensure that each site will have its own cache.inc and take care of the permission problem that is occurring. I have temporarily fixed it for myself, by deleting the cache.inc file, logged in as root. This allows it to be recreated with the new permissions.
Comment #6
beermann commentedI just did a quick dirty fix my problem i just chmod 777 the /tmp/cache.inc so that everyone has read/write access to it. But the best thing would be if drush could place the cache.inc in the home folder of the user executing it. This will prevent this from happening.
Comment #7
greg.1.anderson commentedDuplicate of #1049660: remove hardcoded drush pm extension cache; sorry I haven't gotten rid of this hardcoded path yet.