tresf opened a new pull request, #377: URL: https://github.com/apache/commons-io/pull/377
Since [email protected], the `copyDirectory()` function uses `COPY_ATTRIBUTES` to honor the `preserveFileDate` boolean. This properly preserves the date, but introduces an inadvertent effect on file permissions. For example, if copying from `%USERPROFILE%` to `C:\Program Files` the following permissions changes can be observed. | Version | Permissions (`icals <file>`) | |-------------------|---------------------------------| | `[email protected]` | `NT AUTHORITY\SYSTEM:(I)(F)`<br>`BUILTIN\Administrators:(I)(F)`<br>`BUILTIN\Users:(I)(RX)`<br>`APPLICATION PACKAGE AUTHORITY\ALL APPLICATION PACKAGES:(I)(RX)`<br>`APPLICATION PACKAGE AUTHORITY\ALL RESTRICTED APPLICATION PACKAGES:(I)(RX)` | | `[email protected]` | `NT AUTHORITY\SYSTEM:(F)`<br>`BUILTIN\Administrators:(F)`<br>`WIN10ARM\owner:(F)`<br> | This regression is very similar for Unixes. Prior to 2.9, files copied to a `root:root` (Linux) or `root:admin` (MacOS) owned directory would inherit the target permissions. Starting with 2.9, the files will retain their original ownership. The regression can be traced to to the 2.9 release and all releases thereafter. Prior to submitting the PR, a conversation was had on the mailing list and stackoverflow. * Mailing list convo: https://lists.apache.org/thread/schfj3m01ppd3287mxnn04lpp25hgw74 * Stackoverflow convo: https://stackoverflow.com/questions/73428286 | Version | Status | |-------------------|---------------------------------| | `[email protected]` (2005) | ✅ Inherits permissions of destination | | `[email protected]` (2013) | ✅ Inherits permissions of destination | | `[email protected]` (2016) | ✅ Inherits permissions of destination | | `[email protected]` (2017) | ✅ Inherits permissions of destination | | `[email protected]` (2020) | ✅ Inherits permissions of destination | | `[email protected]` (2020) | ✅ Inherits permissions of destination | | `[email protected]` (2021) | 🚫 Does not inherit permissions of destination | | `[email protected]` (2021) | 🚫 Does not inherit permissions of destination | | `[email protected]` (2021) | 🚫 Does not inherit permissions of destination | -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
