[ 
https://issues.apache.org/jira/browse/MASSEMBLY-647?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Osipov closed MASSEMBLY-647.
------------------------------------
    Resolution: Auto Closed

This issue has been auto closed because it has been inactive for a long period 
of time. If you think this issue still applies, retest your problem with the 
most recent version of Maven and the affected component, reopen and post your 
results.

> Archiver drops file/directory mode most significant bits
> --------------------------------------------------------
>
>                 Key: MASSEMBLY-647
>                 URL: https://issues.apache.org/jira/browse/MASSEMBLY-647
>             Project: Maven Assembly Plugin
>          Issue Type: Bug
>          Components: maven-archiver
>    Affects Versions: 2.4
>            Reporter: Leif Rilbe
>            Priority: Major
>
> 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 was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to