You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Arnaud de Bossoreille (JIRA)" <ji...@codehaus.org> on 2010/08/16 17:11:32 UTC

[jira] Created: (MASSEMBLY-494) No way to set the directory mode for the base directory nor any implicitly created directory for zip assemblies

No way to set the directory mode for the base directory nor any implicitly created directory for zip assemblies
---------------------------------------------------------------------------------------------------------------

                 Key: MASSEMBLY-494
                 URL: http://jira.codehaus.org/browse/MASSEMBLY-494
             Project: Maven 2.x Assembly Plugin
          Issue Type: Bug
    Affects Versions: 2.2-beta-5
         Environment: Debian GNU/Linux
            Reporter: Arnaud de Bossoreille
         Attachments: assembly-test.zip

A sample maven project is attached to reproduce everything. I am trying to generate a zip file with correct permissions (i.e. directories not writable by everyone which I would say should not be too difficult).

If you run `mvn assembly:assembly` as is, you will have:

drwxrwxrwx ... assembly-test-1.0.0/
drwxrwxrwx ... assembly-test-1.0.0/bin/
-rw-r--r-- ... assembly-test-1.0.0/bin/assembly-test-1.0.0.jar
-rw-r--r-- ... assembly-test-1.0.0/bin/commons-lang-2.4.jar
drwxr-xr-x ... assembly-test-1.0.0/copyofsubdir/
-rw-r--r-- ... assembly-test-1.0.0/copyofsubdir/file

I found no way to set the first two directories permissions. If you add the two directoryMode tags, you will have:

drwxrwxrwx ... assembly-test-1.0.0/
drwxrwxrwx ... assembly-test-1.0.0/bin/
-rw-r--r-- ... assembly-test-1.0.0/bin/assembly-test-1.0.0.jar
-rw-r--r-- ... assembly-test-1.0.0/bin/commons-lang-2.4.jar
drwxr-xr-x ... assembly-test-1.0.0/copyofsubdir/
-rwxrwxrwx ... assembly-test-1.0.0/copyofsubdir/file*

... which is pretty much what I did NOT expect (a cut'n paste issue in the code?). If you add both directoryMode and fileMode, you will have the same results as the first iteration (see above).

Unfortunately I still cannot change the permissions of:

    - the base directory (assembly-test-1.0.0)
    - any directory that is not present on the file system (bin)

I looked a bit at the code and, as far as I can see, it may be linked to the plexus zip archiver (although it may not be responsible for the bug) which automatically adds parent directories but most probably with incorrect permissions due to bad configuration.

I did not test with other assembly formats.

PS: yes I can do a simple tarball, and I will probably do that while waiting for a patch. But I think it is important that you are aware of something which may annoy more than one single user in the world.

Regards.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MASSEMBLY-494) No way to set the directory mode for the base directory nor any implicitly created directory for zip assemblies

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MASSEMBLY-494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=273236#comment-273236 ] 

John Casey commented on MASSEMBLY-494:
--------------------------------------

Try the following assembly plugin configuration, in your pom.xml:

{code:xml}
<archiverConfig>
  <defaultDirectoryMode>0755</defaultDirectoryMode>
</archiverConfig>
{code}

I've verified that this provides the ability to manage the default directory mode for automatically created / implied directories.

> No way to set the directory mode for the base directory nor any implicitly created directory for zip assemblies
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: MASSEMBLY-494
>                 URL: https://jira.codehaus.org/browse/MASSEMBLY-494
>             Project: Maven 2.x Assembly Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2-beta-5
>         Environment: Debian GNU/Linux
>            Reporter: Arnaud de Bossoreille
>         Attachments: assembly-test.zip
>
>
> A sample maven project is attached to reproduce everything. I am trying to generate a zip file with correct permissions (i.e. directories not writable by everyone which I would say should not be too difficult).
> If you run `mvn assembly:assembly` as is, you will have:
> drwxrwxrwx ... assembly-test-1.0.0/
> drwxrwxrwx ... assembly-test-1.0.0/bin/
> -rw-r--r-- ... assembly-test-1.0.0/bin/assembly-test-1.0.0.jar
> -rw-r--r-- ... assembly-test-1.0.0/bin/commons-lang-2.4.jar
> drwxr-xr-x ... assembly-test-1.0.0/copyofsubdir/
> -rw-r--r-- ... assembly-test-1.0.0/copyofsubdir/file
> I found no way to set the first two directories permissions. If you add the two directoryMode tags, you will have:
> drwxrwxrwx ... assembly-test-1.0.0/
> drwxrwxrwx ... assembly-test-1.0.0/bin/
> -rw-r--r-- ... assembly-test-1.0.0/bin/assembly-test-1.0.0.jar
> -rw-r--r-- ... assembly-test-1.0.0/bin/commons-lang-2.4.jar
> drwxr-xr-x ... assembly-test-1.0.0/copyofsubdir/
> -rwxrwxrwx ... assembly-test-1.0.0/copyofsubdir/file*
> ... which is pretty much what I did NOT expect (a cut'n paste issue in the code?). If you add both directoryMode and fileMode, you will have the same results as the first iteration (see above).
> Unfortunately I still cannot change the permissions of:
>     - the base directory (assembly-test-1.0.0)
>     - any directory that is not present on the file system (bin)
> I looked a bit at the code and, as far as I can see, it may be linked to the plexus zip archiver (although it may not be responsible for the bug) which automatically adds parent directories but most probably with incorrect permissions due to bad configuration.
> I did not test with other assembly formats.
> PS: yes I can do a simple tarball, and I will probably do that while waiting for a patch. But I think it is important that you are aware of something which may annoy more than one single user in the world.
> Regards.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MASSEMBLY-494) No way to set the directory mode for the base directory nor any implicitly created directory for zip assemblies

Posted by "Arnaud de Bossoreille (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MASSEMBLY-494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=291585#comment-291585 ] 

Arnaud de Bossoreille commented on MASSEMBLY-494:
-------------------------------------------------

It works, but I have the 493 issue which I suspect to be a bug (affects 2.3 too).

And you did not mention the fact that in 2.2-beta-5, the directoryMode tag changed the permissions of files instead of directories. Was not a bug? Fortunately it seems to be fixed in 2.3.
                
> No way to set the directory mode for the base directory nor any implicitly created directory for zip assemblies
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: MASSEMBLY-494
>                 URL: https://jira.codehaus.org/browse/MASSEMBLY-494
>             Project: Maven 2.x Assembly Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2-beta-5
>         Environment: Debian GNU/Linux
>            Reporter: Arnaud de Bossoreille
>            Assignee: John Casey
>         Attachments: assembly-test.zip
>
>
> A sample maven project is attached to reproduce everything. I am trying to generate a zip file with correct permissions (i.e. directories not writable by everyone which I would say should not be too difficult).
> If you run `mvn assembly:assembly` as is, you will have:
> drwxrwxrwx ... assembly-test-1.0.0/
> drwxrwxrwx ... assembly-test-1.0.0/bin/
> -rw-r--r-- ... assembly-test-1.0.0/bin/assembly-test-1.0.0.jar
> -rw-r--r-- ... assembly-test-1.0.0/bin/commons-lang-2.4.jar
> drwxr-xr-x ... assembly-test-1.0.0/copyofsubdir/
> -rw-r--r-- ... assembly-test-1.0.0/copyofsubdir/file
> I found no way to set the first two directories permissions. If you add the two directoryMode tags, you will have:
> drwxrwxrwx ... assembly-test-1.0.0/
> drwxrwxrwx ... assembly-test-1.0.0/bin/
> -rw-r--r-- ... assembly-test-1.0.0/bin/assembly-test-1.0.0.jar
> -rw-r--r-- ... assembly-test-1.0.0/bin/commons-lang-2.4.jar
> drwxr-xr-x ... assembly-test-1.0.0/copyofsubdir/
> -rwxrwxrwx ... assembly-test-1.0.0/copyofsubdir/file*
> ... which is pretty much what I did NOT expect (a cut'n paste issue in the code?). If you add both directoryMode and fileMode, you will have the same results as the first iteration (see above).
> Unfortunately I still cannot change the permissions of:
>     - the base directory (assembly-test-1.0.0)
>     - any directory that is not present on the file system (bin)
> I looked a bit at the code and, as far as I can see, it may be linked to the plexus zip archiver (although it may not be responsible for the bug) which automatically adds parent directories but most probably with incorrect permissions due to bad configuration.
> I did not test with other assembly formats.
> PS: yes I can do a simple tarball, and I will probably do that while waiting for a patch. But I think it is important that you are aware of something which may annoy more than one single user in the world.
> Regards.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MASSEMBLY-494) No way to set the directory mode for the base directory nor any implicitly created directory for zip assemblies

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MASSEMBLY-494?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Casey closed MASSEMBLY-494.
--------------------------------

    Resolution: Not A Bug
      Assignee: John Casey

> No way to set the directory mode for the base directory nor any implicitly created directory for zip assemblies
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: MASSEMBLY-494
>                 URL: https://jira.codehaus.org/browse/MASSEMBLY-494
>             Project: Maven 2.x Assembly Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2-beta-5
>         Environment: Debian GNU/Linux
>            Reporter: Arnaud de Bossoreille
>            Assignee: John Casey
>         Attachments: assembly-test.zip
>
>
> A sample maven project is attached to reproduce everything. I am trying to generate a zip file with correct permissions (i.e. directories not writable by everyone which I would say should not be too difficult).
> If you run `mvn assembly:assembly` as is, you will have:
> drwxrwxrwx ... assembly-test-1.0.0/
> drwxrwxrwx ... assembly-test-1.0.0/bin/
> -rw-r--r-- ... assembly-test-1.0.0/bin/assembly-test-1.0.0.jar
> -rw-r--r-- ... assembly-test-1.0.0/bin/commons-lang-2.4.jar
> drwxr-xr-x ... assembly-test-1.0.0/copyofsubdir/
> -rw-r--r-- ... assembly-test-1.0.0/copyofsubdir/file
> I found no way to set the first two directories permissions. If you add the two directoryMode tags, you will have:
> drwxrwxrwx ... assembly-test-1.0.0/
> drwxrwxrwx ... assembly-test-1.0.0/bin/
> -rw-r--r-- ... assembly-test-1.0.0/bin/assembly-test-1.0.0.jar
> -rw-r--r-- ... assembly-test-1.0.0/bin/commons-lang-2.4.jar
> drwxr-xr-x ... assembly-test-1.0.0/copyofsubdir/
> -rwxrwxrwx ... assembly-test-1.0.0/copyofsubdir/file*
> ... which is pretty much what I did NOT expect (a cut'n paste issue in the code?). If you add both directoryMode and fileMode, you will have the same results as the first iteration (see above).
> Unfortunately I still cannot change the permissions of:
>     - the base directory (assembly-test-1.0.0)
>     - any directory that is not present on the file system (bin)
> I looked a bit at the code and, as far as I can see, it may be linked to the plexus zip archiver (although it may not be responsible for the bug) which automatically adds parent directories but most probably with incorrect permissions due to bad configuration.
> I did not test with other assembly formats.
> PS: yes I can do a simple tarball, and I will probably do that while waiting for a patch. But I think it is important that you are aware of something which may annoy more than one single user in the world.
> Regards.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MASSEMBLY-494) No way to set the directory mode for the base directory nor any implicitly created directory for zip assemblies

Posted by "Dennis Cook (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MASSEMBLY-494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=273665#comment-273665 ] 

Dennis Cook commented on MASSEMBLY-494:
---------------------------------------

I'm using Maven 2.2.1, and version 2.2.1 of the assembly plug-in; building the assembly as a ZIP on Windows, and then unzipping on Linux.

In this situation, it looks as though the {{defaultDirectoryMode}} is being interpreted as a _decimal_ number. So in order to acheive {{rwxr-xr-x}}, I need to set the value to 493. Is this expected?

> No way to set the directory mode for the base directory nor any implicitly created directory for zip assemblies
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: MASSEMBLY-494
>                 URL: https://jira.codehaus.org/browse/MASSEMBLY-494
>             Project: Maven 2.x Assembly Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2-beta-5
>         Environment: Debian GNU/Linux
>            Reporter: Arnaud de Bossoreille
>            Assignee: John Casey
>         Attachments: assembly-test.zip
>
>
> A sample maven project is attached to reproduce everything. I am trying to generate a zip file with correct permissions (i.e. directories not writable by everyone which I would say should not be too difficult).
> If you run `mvn assembly:assembly` as is, you will have:
> drwxrwxrwx ... assembly-test-1.0.0/
> drwxrwxrwx ... assembly-test-1.0.0/bin/
> -rw-r--r-- ... assembly-test-1.0.0/bin/assembly-test-1.0.0.jar
> -rw-r--r-- ... assembly-test-1.0.0/bin/commons-lang-2.4.jar
> drwxr-xr-x ... assembly-test-1.0.0/copyofsubdir/
> -rw-r--r-- ... assembly-test-1.0.0/copyofsubdir/file
> I found no way to set the first two directories permissions. If you add the two directoryMode tags, you will have:
> drwxrwxrwx ... assembly-test-1.0.0/
> drwxrwxrwx ... assembly-test-1.0.0/bin/
> -rw-r--r-- ... assembly-test-1.0.0/bin/assembly-test-1.0.0.jar
> -rw-r--r-- ... assembly-test-1.0.0/bin/commons-lang-2.4.jar
> drwxr-xr-x ... assembly-test-1.0.0/copyofsubdir/
> -rwxrwxrwx ... assembly-test-1.0.0/copyofsubdir/file*
> ... which is pretty much what I did NOT expect (a cut'n paste issue in the code?). If you add both directoryMode and fileMode, you will have the same results as the first iteration (see above).
> Unfortunately I still cannot change the permissions of:
>     - the base directory (assembly-test-1.0.0)
>     - any directory that is not present on the file system (bin)
> I looked a bit at the code and, as far as I can see, it may be linked to the plexus zip archiver (although it may not be responsible for the bug) which automatically adds parent directories but most probably with incorrect permissions due to bad configuration.
> I did not test with other assembly formats.
> PS: yes I can do a simple tarball, and I will probably do that while waiting for a patch. But I think it is important that you are aware of something which may annoy more than one single user in the world.
> Regards.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira