I keep getting this error when trying to configure the upload directory with Apache 2.2 and PHP 5.3 on CentOS.
In php.ini:
upload_tmp_dir = /var/www/ht
I ran into this related issue even after having already successfully run composer. I updated composer, and when running composer install
or php composer.phar install
I got:
...failed to open stream: Permission denied...
It turns out after much research that the previous answers regarding changing permissions for the folder worked. They are just slightly different directories now.
In my install, on OS X, the cache file is in /Users/[USER]/.composer/cache
, and I was having trouble because the cache file was owned by root. Changing ownership of '.composer' recursively to my user solved the issue.
This is what I did:
sudo chown -R [USER] cache
Then I ran the composer install again and voila!