title: WP-CLI error installing plugins/themes. "Could not create directory". Permissions error? Ubuntu 14.04 x64
body: <p>I've been searching for a few days now trying to figure out a solution to this problem, but I've given up and its time to ask for some help.</p>
  
  <p>I'm running Wordpress on an Ubuntu 14.04 x64, using a Vagrant server created with <a href="https://puphpet.com" rel="nofollow">PuPHPet</a> (an automated GUI for creating boxes with Vagrant, Puppet, and Hiera for those who are unaware). I use Mark Jaquith's WP-Skeleton Wordpress folder set up, and have two shared folders set up; /var/www/wp (sitename/www/wp on the host) for Wordpress core files, and /var/www/content/ (sitename/www/content on the host) for a custom content directory which is the purpose of WP-Skeleton.</p>
  
  <p>When SSH'ing into the VM and running WP-CLI, everything seems to work correctly as far as WP-CLI knowing the Path to my Content directory, and Wordpress core files. The problem is when trying to install plugins or themes, as shown below-</p>
  
  <p><code>[07:20 PM]-[vagrant@packer-virtualbox-iso-1422601639]-[/var/www]-[git master]
  $ wp plugin install jetpack
  Installing Jetpack by WordPress.com (3.3.2)
  Downloading install package from https://downloads.wordpress.org/plugin/jetpack.3.3.2.zip...
  Unpacking the package...
  Warning: Could not create directory.</code></p>
  
  <p>My first, and only thought so far is that this is a permissions error, but with my limited knowledge of this area, I've only been able to do so much, however, I can say that I've tried changing the permissions of the Content directory to 755, then 765, and even 777 using chmod -v 755 /var/www/content/.</p>
  
  <p>That also didn't work, even with the permissions set to 777. So what else could be wrong? I know this probably has to do with permissions for www-data, but like I said, I have limited knowledge of what to look for, or change. I'm sure this is something simple, and I'm sure this isn't directly related to WP-CLI, as I have a feeling if I used any other web app to try and install to the www folder that I'd have the same problem.</p>
  
  <p>If anyone needs any information from me, I'll include it such as my congif.yaml file (which when using Hiera with Puppet stores all of the info that would normally would be in the Vagranfile, and automates installing Puppet modules). It also includes info about the Ubuntu box, folder set up, etc. </p>
  
  <p>Thanks in advance,
  P.J.</p>
  
  <p>Update:</p>
  
  <p>I would like to add that adding <code>sudo wp plugin install jetpack --allow-root</code> will work when I use WP-CLI, however, I shouldn't have to use sudo if I'm the root user, should I?</p>