You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2023/04/18 21:51:00 UTC

[jira] [Updated] (IO-678) FileUtils.copyFile does not maintain file permissions

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

Gary D. Gregory updated IO-678:
-------------------------------
    Fix Version/s: 2.12.0
      Environment: 
Merged [https://github.com/apache/commons-io/pull/377, see the PR for behavior.|https://github.com/apache/commons-io/pull/377]

COPY_ATTRIBUTES is no longer used by default.

> FileUtils.copyFile does not maintain file permissions
> -----------------------------------------------------
>
>                 Key: IO-678
>                 URL: https://issues.apache.org/jira/browse/IO-678
>             Project: Commons IO
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 2.7
>         Environment: Merged [https://github.com/apache/commons-io/pull/377, see the PR for behavior.|https://github.com/apache/commons-io/pull/377]
> COPY_ATTRIBUTES is no longer used by default.
>            Reporter: Jorge
>            Priority: Major
>             Fix For: 2.9.0, 2.12.0
>
>         Attachments: FileUtilsCopyDirectoryToDirectoryTestCase.java
>
>
> I found that permissions (specifically, execute) are not maintained when using FileUtils.copyFile. The attached test demonstrates the behavior.
>  
> With version 2.6 the following permissions are obtained:
> [OTHERS_READ, OWNER_READ, OWNER_WRITE, GROUP_READ, GROUP_WRITE]
>  
> while with version 2.7:
> [OWNER_READ, OWNER_WRITE]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)