[ https://issues.apache.org/jira/browse/MASSEMBLY-791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17726719#comment-17726719 ]
Marat Abrarov edited comment on MASSEMBLY-791 at 5/26/23 9:40 PM: ------------------------------------------------------------------ Hi [~elharo], With 3.6.0 version of Maven Assembly Plugin {{fileMode}} and {{directoryMode}} options look to be ignored or transformed (umask applied?). This is the reason my team delays migration from 3.5.0 to 3.6.0 - we need to generate archives with specific permissions, like 0777 for specific directory entry in the generated TAR, but we get 0755 with 3.6.0. Refer to [init-image/src/assembly/rootfs.xml|https://github.com/mabrarov/docker-compose-init-container/blob/master/init-image/src/assembly/rootfs.xml] in [mabrarov/docker-compose-init-container|https://github.com/mabrarov/docker-compose-init-container] for example: {noformat} $ mvn -q -pl init-image clean package -D maven-assembly-plugin.version=3.5.0 $ tar -tvf init-image/target/context/rootfs.tar -r-xr-xr-x root/root 1131168 1980-01-01 03:00 usr/bin/busybox -r-xr-xr-x root/root 5407 1980-01-01 03:00 run.sh drwxrwxrwx root/root 0 1980-01-01 03:00 config/ $ mvn -q -pl init-image clean package -D maven-assembly-plugin.version=3.6.0 $ tar -tvf init-image/target/context/rootfs.tar -r-xr-xr-x root/root 1131168 1980-01-01 03:00 usr/bin/busybox -r-xr-xr-x root/root 5407 1980-01-01 03:00 run.sh drwxr-xr-x root/root 0 1980-01-01 03:00 config/ {noformat} was (Author: abrarovm): Hi [~elharo], With 3.6.0 version of Maven Assembly Plugin {{fileMode}} and {{directoryMode}} options look to be ignored or transformed (umask applied?). This is the reason my team delays migration from 3.5.0 to 3.6.0 - we need to generate archives with specific permissions, like 0777 for specific directory entry in the generated TAR, but we get 0755 with 3.6.0. > fileMode not set in dependencySet creating format tar.gz > -------------------------------------------------------- > > Key: MASSEMBLY-791 > URL: https://issues.apache.org/jira/browse/MASSEMBLY-791 > Project: Maven Assembly Plugin > Issue Type: Bug > Components: permissions > Affects Versions: 2.6 > Environment: Linux and Windows > Reporter: Rick Poleshuck > Priority: Major > > The fileMode is ignored within a dependencySet while creating a tar.gz > archive. This works just fine in 2.4. > <dependencySets> > <dependencySet> > <includes> > <include>com.company:dependency-artifact</include> > </includes> > <unpack>true</unpack> > <unpackOptions> > <includes> > <include>*.py</include> > </includes> > </unpackOptions> > <outputDirectory/> > <fileMode>0750</fileMode> > <directoryMode>0750</directoryMode> > </dependencySet> > </dependencySets> > </ -- This message was sent by Atlassian Jira (v8.20.10#820010)