You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Martin Todorov (JIRA)" <ji...@codehaus.org> on 2010/12/09 22:13:57 UTC

[jira] Created: (MRESOURCES-132) Copying of files with permissions broken

Copying of files with permissions broken
----------------------------------------

                 Key: MRESOURCES-132
                 URL: http://jira.codehaus.org/browse/MRESOURCES-132
             Project: Maven 2.x Resources Plugin
          Issue Type: Bug
    Affects Versions: 2.4.3
         Environment: Apache Maven 2.2.1 (r801777; 2009-08-06 22:16:01+0300)
Java version: 1.6.0_19
Java home: /java/jdk1.6.0_19/jre
Default locale: en_US, platform encoding: ISO-8859-1
OS name: "linux" version: "2.6.28.5" arch: "i386" Family: "unix"

            Reporter: Martin Todorov


Files with permissions are not copied with the permissions as illustrated below:
root@carlspring:/java/opensource/build-force/zipper-plugin# ls -al `find . -name *perm*`
-rwxr--r-- 1 root root   8 2010-12-09 20:48 ./src/test/resources/zip/file.with.permission.sh*
-rw-r--r-- 1 root root   8 2010-12-09 22:56 ./target/test-classes/zip/file.with.permission.sh

Notice the 'x' permission missing from the copied file.

-- 
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] (MRESOURCES-132) Copying of files with permissions broken

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRESOURCES-132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=302645#comment-302645 ] 

Olivier Lamy commented on MRESOURCES-132:
-----------------------------------------

the main issue is performance.
Because we will have to check permissions for all so a lot of io.
Can you use assembly plugin for your use case ?
                
> Copying of files with permissions broken
> ----------------------------------------
>
>                 Key: MRESOURCES-132
>                 URL: https://jira.codehaus.org/browse/MRESOURCES-132
>             Project: Maven 2.x Resources Plugin
>          Issue Type: Bug
>          Components: copy
>    Affects Versions: 2.4.3
>         Environment: Apache Maven 2.2.1 (r801777; 2009-08-06 22:16:01+0300)
> Java version: 1.6.0_19
> Java home: /java/jdk1.6.0_19/jre
> Default locale: en_US, platform encoding: ISO-8859-1
> OS name: "linux" version: "2.6.28.5" arch: "i386" Family: "unix"
>            Reporter: Martin Todorov
>
> Files with permissions are not copied with the permissions as illustrated below:
> {noformat}
> root@carlspring:/java/opensource/build-force/zipper-plugin# ls -al `find . -name *perm*`
> -rwxr--r-- 1 root root   8 2010-12-09 20:48 ./src/test/resources/zip/file.with.permission.sh*
> -rw-r--r-- 1 root root   8 2010-12-09 22:56 ./target/test-classes/zip/file.with.permission.sh
> {noformat}
> Notice the 'x' permission missing from the copied file.

--
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] (MRESOURCES-132) Copying of files with permissions broken

Posted by "Martin Todorov (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRESOURCES-132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=302692#comment-302692 ] 

Martin Todorov commented on MRESOURCES-132:
-------------------------------------------

Hm... I can't seem to find my fix.

Either way, this needs to be addressed properly. The release plugin should copy resources around with their proper permissions, otherwise it could cause an unexpected security threat. Preserving the permissions is the expected behavior. Most people will not pay attention to this until it happens and I doubt that the assembly plugin will always be able to solve their problem.
                
> Copying of files with permissions broken
> ----------------------------------------
>
>                 Key: MRESOURCES-132
>                 URL: https://jira.codehaus.org/browse/MRESOURCES-132
>             Project: Maven 2.x Resources Plugin
>          Issue Type: Bug
>          Components: copy
>    Affects Versions: 2.4.3
>         Environment: Apache Maven 2.2.1 (r801777; 2009-08-06 22:16:01+0300)
> Java version: 1.6.0_19
> Java home: /java/jdk1.6.0_19/jre
> Default locale: en_US, platform encoding: ISO-8859-1
> OS name: "linux" version: "2.6.28.5" arch: "i386" Family: "unix"
>            Reporter: Martin Todorov
>
> Files with permissions are not copied with the permissions as illustrated below:
> {noformat}
> root@carlspring:/java/opensource/build-force/zipper-plugin# ls -al `find . -name *perm*`
> -rwxr--r-- 1 root root   8 2010-12-09 20:48 ./src/test/resources/zip/file.with.permission.sh*
> -rw-r--r-- 1 root root   8 2010-12-09 22:56 ./target/test-classes/zip/file.with.permission.sh
> {noformat}
> Notice the 'x' permission missing from the copied file.

--
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] (MRESOURCES-132) Copying of files with permissions broken

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MRESOURCES-132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Lundberg updated MRESOURCES-132:
---------------------------------------

    Description: 
Files with permissions are not copied with the permissions as illustrated below:

{noformat}
root@carlspring:/java/opensource/build-force/zipper-plugin# ls -al `find . -name *perm*`
-rwxr--r-- 1 root root   8 2010-12-09 20:48 ./src/test/resources/zip/file.with.permission.sh*
-rw-r--r-- 1 root root   8 2010-12-09 22:56 ./target/test-classes/zip/file.with.permission.sh
{noformat}

Notice the 'x' permission missing from the copied file.

  was:
Files with permissions are not copied with the permissions as illustrated below:
root@carlspring:/java/opensource/build-force/zipper-plugin# ls -al `find . -name *perm*`
-rwxr--r-- 1 root root   8 2010-12-09 20:48 ./src/test/resources/zip/file.with.permission.sh*
-rw-r--r-- 1 root root   8 2010-12-09 22:56 ./target/test-classes/zip/file.with.permission.sh

Notice the 'x' permission missing from the copied file.

    
> Copying of files with permissions broken
> ----------------------------------------
>
>                 Key: MRESOURCES-132
>                 URL: https://jira.codehaus.org/browse/MRESOURCES-132
>             Project: Maven 2.x Resources Plugin
>          Issue Type: Bug
>          Components: copy
>    Affects Versions: 2.4.3
>         Environment: Apache Maven 2.2.1 (r801777; 2009-08-06 22:16:01+0300)
> Java version: 1.6.0_19
> Java home: /java/jdk1.6.0_19/jre
> Default locale: en_US, platform encoding: ISO-8859-1
> OS name: "linux" version: "2.6.28.5" arch: "i386" Family: "unix"
>            Reporter: Martin Todorov
>
> Files with permissions are not copied with the permissions as illustrated below:
> {noformat}
> root@carlspring:/java/opensource/build-force/zipper-plugin# ls -al `find . -name *perm*`
> -rwxr--r-- 1 root root   8 2010-12-09 20:48 ./src/test/resources/zip/file.with.permission.sh*
> -rw-r--r-- 1 root root   8 2010-12-09 22:56 ./target/test-classes/zip/file.with.permission.sh
> {noformat}
> Notice the 'x' permission missing from the copied file.

--
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] (MRESOURCES-132) Copying of files with permissions broken

Posted by "Martin Todorov (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRESOURCES-132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=302646#comment-302646 ] 

Martin Todorov commented on MRESOURCES-132:
-------------------------------------------

Olivier... That was some two years ago. I don't remember what my use case was back then, but I think it could now be replaced by the assembly plugin. I have however fixed it in my zipper plugin. I will send you a link tomorrow.
                
> Copying of files with permissions broken
> ----------------------------------------
>
>                 Key: MRESOURCES-132
>                 URL: https://jira.codehaus.org/browse/MRESOURCES-132
>             Project: Maven 2.x Resources Plugin
>          Issue Type: Bug
>          Components: copy
>    Affects Versions: 2.4.3
>         Environment: Apache Maven 2.2.1 (r801777; 2009-08-06 22:16:01+0300)
> Java version: 1.6.0_19
> Java home: /java/jdk1.6.0_19/jre
> Default locale: en_US, platform encoding: ISO-8859-1
> OS name: "linux" version: "2.6.28.5" arch: "i386" Family: "unix"
>            Reporter: Martin Todorov
>
> Files with permissions are not copied with the permissions as illustrated below:
> {noformat}
> root@carlspring:/java/opensource/build-force/zipper-plugin# ls -al `find . -name *perm*`
> -rwxr--r-- 1 root root   8 2010-12-09 20:48 ./src/test/resources/zip/file.with.permission.sh*
> -rw-r--r-- 1 root root   8 2010-12-09 22:56 ./target/test-classes/zip/file.with.permission.sh
> {noformat}
> Notice the 'x' permission missing from the copied file.

--
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] Updated: (MRESOURCES-132) Copying of files with permissions broken

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MRESOURCES-132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Lundberg updated MRESOURCES-132:
---------------------------------------

    Component/s: copy

> Copying of files with permissions broken
> ----------------------------------------
>
>                 Key: MRESOURCES-132
>                 URL: http://jira.codehaus.org/browse/MRESOURCES-132
>             Project: Maven 2.x Resources Plugin
>          Issue Type: Bug
>          Components: copy
>    Affects Versions: 2.4.3
>         Environment: Apache Maven 2.2.1 (r801777; 2009-08-06 22:16:01+0300)
> Java version: 1.6.0_19
> Java home: /java/jdk1.6.0_19/jre
> Default locale: en_US, platform encoding: ISO-8859-1
> OS name: "linux" version: "2.6.28.5" arch: "i386" Family: "unix"
>            Reporter: Martin Todorov
>
> Files with permissions are not copied with the permissions as illustrated below:
> root@carlspring:/java/opensource/build-force/zipper-plugin# ls -al `find . -name *perm*`
> -rwxr--r-- 1 root root   8 2010-12-09 20:48 ./src/test/resources/zip/file.with.permission.sh*
> -rw-r--r-- 1 root root   8 2010-12-09 22:56 ./target/test-classes/zip/file.with.permission.sh
> Notice the 'x' permission missing from the copied file.

-- 
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] (MRESOURCES-132) Copying of files with permissions broken

Posted by "Martin Todorov (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRESOURCES-132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=302648#comment-302648 ] 

Martin Todorov commented on MRESOURCES-132:
-------------------------------------------

Well, you are right and I believe the fix was rather simple.
I believe that preserving the permissions is quite important and should be corrected in the resources plugin.
                
> Copying of files with permissions broken
> ----------------------------------------
>
>                 Key: MRESOURCES-132
>                 URL: https://jira.codehaus.org/browse/MRESOURCES-132
>             Project: Maven 2.x Resources Plugin
>          Issue Type: Bug
>          Components: copy
>    Affects Versions: 2.4.3
>         Environment: Apache Maven 2.2.1 (r801777; 2009-08-06 22:16:01+0300)
> Java version: 1.6.0_19
> Java home: /java/jdk1.6.0_19/jre
> Default locale: en_US, platform encoding: ISO-8859-1
> OS name: "linux" version: "2.6.28.5" arch: "i386" Family: "unix"
>            Reporter: Martin Todorov
>
> Files with permissions are not copied with the permissions as illustrated below:
> {noformat}
> root@carlspring:/java/opensource/build-force/zipper-plugin# ls -al `find . -name *perm*`
> -rwxr--r-- 1 root root   8 2010-12-09 20:48 ./src/test/resources/zip/file.with.permission.sh*
> -rw-r--r-- 1 root root   8 2010-12-09 22:56 ./target/test-classes/zip/file.with.permission.sh
> {noformat}
> Notice the 'x' permission missing from the copied file.

--
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] (MRESOURCES-132) Copying of files with permissions broken

Posted by "Gili (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRESOURCES-132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=302647#comment-302647 ] 

Gili commented on MRESOURCES-132:
---------------------------------

Shouldn't correctness always come before performance? Losing permissions along the way is tantamount to losing data (well, meta-data actually, but still important).
                
> Copying of files with permissions broken
> ----------------------------------------
>
>                 Key: MRESOURCES-132
>                 URL: https://jira.codehaus.org/browse/MRESOURCES-132
>             Project: Maven 2.x Resources Plugin
>          Issue Type: Bug
>          Components: copy
>    Affects Versions: 2.4.3
>         Environment: Apache Maven 2.2.1 (r801777; 2009-08-06 22:16:01+0300)
> Java version: 1.6.0_19
> Java home: /java/jdk1.6.0_19/jre
> Default locale: en_US, platform encoding: ISO-8859-1
> OS name: "linux" version: "2.6.28.5" arch: "i386" Family: "unix"
>            Reporter: Martin Todorov
>
> Files with permissions are not copied with the permissions as illustrated below:
> {noformat}
> root@carlspring:/java/opensource/build-force/zipper-plugin# ls -al `find . -name *perm*`
> -rwxr--r-- 1 root root   8 2010-12-09 20:48 ./src/test/resources/zip/file.with.permission.sh*
> -rw-r--r-- 1 root root   8 2010-12-09 22:56 ./target/test-classes/zip/file.with.permission.sh
> {noformat}
> Notice the 'x' permission missing from the copied file.

--
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] (MRESOURCES-132) Copying of files with permissions broken

Posted by "Rajesh Gowda (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRESOURCES-132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=308672#comment-308672 ] 

Rajesh Gowda commented on MRESOURCES-132:
-----------------------------------------

Hi,
Is the fix delivered in the latest version of maven-resources-plugin (v2.6) ??

BR,
Rajesh
                
> Copying of files with permissions broken
> ----------------------------------------
>
>                 Key: MRESOURCES-132
>                 URL: https://jira.codehaus.org/browse/MRESOURCES-132
>             Project: Maven 2.x Resources Plugin
>          Issue Type: Bug
>          Components: copy
>    Affects Versions: 2.4.3
>         Environment: Apache Maven 2.2.1 (r801777; 2009-08-06 22:16:01+0300)
> Java version: 1.6.0_19
> Java home: /java/jdk1.6.0_19/jre
> Default locale: en_US, platform encoding: ISO-8859-1
> OS name: "linux" version: "2.6.28.5" arch: "i386" Family: "unix"
>            Reporter: Martin Todorov
>
> Files with permissions are not copied with the permissions as illustrated below:
> {noformat}
> root@carlspring:/java/opensource/build-force/zipper-plugin# ls -al `find . -name *perm*`
> -rwxr--r-- 1 root root   8 2010-12-09 20:48 ./src/test/resources/zip/file.with.permission.sh*
> -rw-r--r-- 1 root root   8 2010-12-09 22:56 ./target/test-classes/zip/file.with.permission.sh
> {noformat}
> Notice the 'x' permission missing from the copied file.

--
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