title: How do I set directory permissions in maven output?
body: <p>I am using the maven-assembly-plugin to package my build.</p>
  
  <p>I am able to perform some copying of file sets and modify file permissions fine, but I am unable to modify directory permissions. From the documentation, I am trying to use  on the directories I care about. However, regardless of what permissions I specify, directories are ALWAYS created based off of the current umask (0022). 
  Does anyone know of a clean way to modify directory permissions in this way during a Maven build. The only thing that works is <code>umask 0</code>, but I would rather not be forced to do this, since everyone working on this project would have to have this set.</p>
  
  <p>Example maven assembly.xml:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;assembly&gt;
    &lt;id&gt;zip-with-dependencies&lt;/id&gt;
    &lt;formats&gt;
      &lt;format&gt;dir&lt;/format&gt;
      &lt;format&gt;tar.gz&lt;/format&gt;
    &lt;/formats&gt;
    &lt;includeBaseDirectory&gt;true&lt;/includeBaseDirectory&gt;
  
    &lt;dependencySets&gt;
      &lt;dependencySet&gt;
        &lt;includes&gt;
          &lt;include&gt;foo:bar&lt;/include&gt;
        &lt;/includes&gt;
        &lt;outputDirectory&gt;/resources/blah&lt;/outputDirectory&gt;
        &lt;useProjectArtifact&gt;true&lt;/useProjectArtifact&gt;
        &lt;unpack&gt;true&lt;/unpack&gt;
        &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependencySet&gt;
    &lt;/dependencySets&gt;
  
    &lt;fileSets&gt;
      &lt;fileSet&gt;
        &lt;directory&gt;${basedir}/src/main/web&lt;/directory&gt;
        &lt;includes&gt;
          &lt;include&gt;some_dir&lt;/include&gt;
        &lt;/includes&gt;
        &lt;outputDirectory&gt;web&lt;/outputDirectory&gt;
        &lt;fileMode&gt;0777&lt;/fileMode&gt;
        &lt;directoryMode&gt;0777&lt;/directoryMode&gt;
      &lt;/fileSet&gt;
    &lt;/fileSets&gt;
  &lt;/assembly&gt;
  </code></pre>