[ 
https://jira.codehaus.org/browse/MASSEMBLY-647?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=354129#comment-354129
 ] 

Kristian Rosenvold commented on MASSEMBLY-647:
----------------------------------------------

AFAIK there is no way to set these bits with java

> Archiver drops file/directory mode most significant bits
> --------------------------------------------------------
>
>                 Key: MASSEMBLY-647
>                 URL: https://jira.codehaus.org/browse/MASSEMBLY-647
>             Project: Maven 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 was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to