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 giampaolo.rodola
Recipients christian.heimes, eryksun, giampaolo.rodola, noctiflore
Date 2020-07-20.11:01:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1595242911.52.0.565267141103.issue30044@roundup.psfhosted.org>
In-reply-to
Content
Since the need to copy file ownership is common, I think there could be space for a new copy3() function which copies ownership + extended attributes (where possible). In detail:

- on Windows this can be achieved by using CopyFileEx, which would also provide better overall performances than the current readinto() implementation. This was the original approach used in BPO-33671, discarded after Eryk pointed out that ACLs should not be copied.

- on macOS we can use fcopyfile() (which is already exposed privately) + COPYFILE_ALL, see http://www.manpagez.com/man/3/fcopyfile/

- on all other UNIX we can use the current shutil.copystat() (which already copies xattrs) + os.chown(). I am not entirely sure this would achieve a "full ACLs copy" though, or what would be needed exactly to achieve that.
History
Date User Action Args
2020-07-20 11:01:51giampaolo.rodolasetrecipients: + giampaolo.rodola, christian.heimes, eryksun, noctiflore
2020-07-20 11:01:51giampaolo.rodolasetmessageid: <1595242911.52.0.565267141103.issue30044@roundup.psfhosted.org>
2020-07-20 11:01:51giampaolo.rodolalinkissue30044 messages
2020-07-20 11:01:50giampaolo.rodolacreate