[New-bugs-announce] [issue34260] shutil.copy2 is not the same as cp -p

Zsolt Cserna report at bugs.python.org
Sat Jul 28 08:43:01 EDT 2018


New submission from Zsolt Cserna <zsolt.cserna at morganstanley.com>:

The docstring of shutil.copy2 says the following:

Copy data and all stat info ("cp -p src dst").

This can be misleading as it is not the same as 'cp -p', as it does not copy the file owner (uid and gid). That would need to have a chown() call to be made, which is currently not called unavailable.

I would like to have the documentation fixed by adding that it does not copies file owner and group.

----------
components: Library (Lib)
messages: 322551
nosy: csernazs
priority: normal
severity: normal
status: open
title: shutil.copy2 is not the same as cp -p
versions: Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34260>
_______________________________________


More information about the New-bugs-announce mailing list