title: Confused about install -m and install -d using Yocto
body: <p>I have taken over a Yocto project, and inside a .bb recipe file, I see the following lines to install new directories in the image:</p>
  
  <pre><code>do_install() {
  install -m 0755 -d ${DEPLOY_DIR_IMAGE}/app
  install -m 0755 -d ${DEPLOY_DIR_IMAGE}/app/apiary
  install -m 0755 -d ${DEPLOY_DIR_IMAGE}/app/lib
  install -m 0755 -d ${DEPLOY_DIR_IMAGE}/app/config
  install -m 0755 -d ${DEPLOY_DIR_IMAGE}/app/scripts
  install -m 0755 -d ${DEPLOY_DIR_IMAGE}/app/keys
  </code></pre>
  
  <p>This works but I am confused. From my reading about Yocto and doing do_install, I thought that the <em>-m</em> option is only for installing files and not directories. </p>
  
  <p>What is the effect of doing <em>install -m 0755 -d</em> , both the <em>-m</em> and <em>-d</em> options with the install command?</p>
  
  <p>Also, why is there no ${D} variable like in the majority of other directory installations which I see? 
  I normally wouldn't resort to Stack Overflow for a question like this, but there is so much inconsistency that I don't understand , and hard to find an answer. </p>