[issue30044] shutil.copystat should (allow to) copy ownership, and other attributes

2021-03-17 Thread Steve Dower
Steve Dower added the comment: Just wanted to add that the sooner we can offer a wrapper around CopyFileEx on Windows (with no callbacks), the sooner we can take advantage of some significant optimisations that are being done to this function (which I can't share details of right now, but

[issue30044] shutil.copystat should (allow to) copy ownership, and other attributes

2021-01-06 Thread Eryk Sun
Eryk Sun added the comment: > 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

[issue30044] shutil.copystat should (allow to) copy ownership, and other attributes

2021-01-05 Thread David Justo
David Justo added the comment: Hi folks, I'd be interested in contributing to this issue, since it seems "easy" enough, but I'm unsure that consensus was reached about the right solution. >From what I gathered from Giampaolo's comments, we have solutions that should >work for Unix-y systems

[issue30044] shutil.copystat should (allow to) copy ownership, and other attributes

2021-01-01 Thread Rahul Jha
Change by Rahul Jha : -- nosy: +RJ722 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30044] shutil.copystat should (allow to) copy ownership, and other attributes

2020-07-20 Thread Eryk Sun
Eryk Sun added the comment: > 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). FYI, Windows and POSIX have significantly different concepts about file (object)

[issue30044] shutil.copystat should (allow to) copy ownership, and other attributes

2020-07-20 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Sorry, after re-reading Eryk's comment, it seems I'm not correct about CopyFileEx. -- ___ Python tracker ___

[issue30044] shutil.copystat should (allow to) copy ownership, and other attributes

2020-07-20 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: 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

[issue30044] shutil.copystat should (allow to) copy ownership, and other attributes

2020-07-10 Thread Eryk Sun
Eryk Sun added the comment: In Windows, I wouldn't expect shutil.copy2 to preserve the owner and ACLs. They change whenever a file gets copied via CopyFileExW [1]. Keeping them exactly as in the source file generally requires a privileged backup and restore operation, such as via BackupRead

[issue30044] shutil.copystat should (allow to) copy ownership, and other attributes

2020-07-10 Thread Christian Heimes
Christian Heimes added the comment: POSIX ACLs and SELinux context information are stored in extended file attributes. The information is copied from source to destination. POSIX ACLs are stored in xattr "system.posix_acl_access" and SELinux context in xattr "security.selinux". --

[issue30044] shutil.copystat should (allow to) copy ownership, and other attributes

2018-06-12 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: This could be achieved at least on Windows with CopyFileEx [1] and on OSX with copyfile(3) + COPYFILE_ALL which copies ACLs (but not users/groups). These are (were, in case of CopyFileEx) exposed in https://github.com/python/cpython/pull/7160/. Such a

[issue30044] shutil.copystat should (allow to) copy ownership, and other attributes

2017-04-14 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- versions: -Python 3.5, Python 3.6 ___ Python tracker ___

[issue30044] shutil.copystat should (allow to) copy ownership, and other attributes

2017-04-11 Thread Florent Coriat
New submission from Florent Coriat: shutil.copystat() copies permissions, timestamps and even flags and xattrs (if supported), but not ownership. Furthermore, shutil.copy2() documentation until 2.7 used to say it behaves like cp -p, which preserves ownership, and not xattr nor flags. (On my