Leif Rilbe created MASSEMBLY-647:
------------------------------------
Summary: Archiver drops file/directory mode most significant bits
Key: MASSEMBLY-647
URL: https://jira.codehaus.org/browse/MASSEMBLY-647
Project: Maven 2.x Assembly Plugin
Issue Type: Bug
Components: maven-archiver
Affects Versions: 2.4
Reporter: Leif Rilbe
Problem detected when trying to build a zip assembly with directories having
the setgid bit set.
Wanted directory mode: drwxrws---
Archiver config:
<archiverConfig>
<!-- (rwxrws===) = 2770(oct) -->
<directoryMode>1528</directoryMode>
<defaultDirectoryMode>1528</defaultDirectoryMode>
</archiverConfig>
FileSet config in assembly descriptor:
<fileSet>
<directory>${project.build.directory}</directory>
<includes>
<include>./</include>
</includes>
<outputDirectory>/</outputDirectory>
<directoryMode>2770</directoryMode>
</fileSet>
Actual directory mode: drwxrwx---
If I do not specify <directoryMode> in the assembly descriptor, the modes from
the archiverConfig prevale, thus yielding the wanted directory mode. However,
this behaviour seems brittle and possibly any use of <fileMode> or
<directoryMode> in the assembly descriptors seems to "break" the use of the
archiverConfig modes.
>From source code analysis it seems to me that fileset modes are handled by
>means of the org.codehaus.plexus.components.io.attributes.FileAttributes
>class. This class seems to not handle the most significant file mode bits
>(i.e. setuid/setgid/sticky bits). It seems that the assembly plugin sometimes
>routes permission through this class and sometimes not, which causes the most
>significant bits to be sometimes lost and sometimes not.
Perhaps the best route would be to add handling of the setuid/setgid/sticky
bits to the org.codehaus.plexus.components.io.attributes.FileAttributes class?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira