This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients RJ722, christian.heimes, davidmrdavid, eryksun, giampaolo.rodola, noctiflore
Date 2021-01-06.16:32:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> For Windows though, I'm unsure.

If copystat() gains the ability to copy the file's owner and group in POSIX, it is not a priority to mirror this capability in Windows, which doesn't implement anything like the Unix owner-group-other permission model. The only security metadata that I expect to be copied in Windows is the file's resource attributes, which are named attributes set on an object -- and considered inherent to the object -- for use in conditional access-control entries. Normally, the rest of the security descriptor is not copied, including the owner, group, mandatory label (integrity level and read-up/write-up/execute-up access), discretionary access-control list, and system access-control list (audit entries). That level of deep copying is a backup and restore operation of the complete file context, not a normal file copy.

Regarding copy2(), what I've seen proposed a couple of times for Windows is to implement it via CopyFileExW(). The documentation of copy2() would have to be special cased to explain that the platform copy routine is used in Windows, which copies all named (alternate) data streams and settable file attributes, extended attributes, and resource attributes. It would also need to be emphasized that copy2() is not equivalent to copyfile() + copystat() in Windows.
Date User Action Args
2021-01-06 16:32:08eryksunsetrecipients: + eryksun, giampaolo.rodola, christian.heimes, noctiflore, RJ722, davidmrdavid
2021-01-06 16:32:08eryksunsetmessageid: <>
2021-01-06 16:32:08eryksunlinkissue30044 messages
2021-01-06 16:32:08eryksuncreate