title: Linux directory permission inheritance
body: <p>Can someone explain to me how directory permissions are inherited in Linux (Ubuntu, specifically)?</p>
  
  <p>For example, what if I have the following directory structure:</p>
  
  <pre><code>folder_A
      folder_B
  </code></pre>
  
  <p>Do folder_A's permissions always override folder_B's? Is there any difference if folder_A's permissions are more restrictive than folder_B's, or vice-versa?</p>
  
  <p>My guess would be that if folder_B had more restrictive permissions, it would override folder_A's, but if folder_A had more restrictive permissions, then it would override its children.</p>