[New-bugs-announce] [issue2845] shutil.copy2() copies permission bits

igs report at bugs.python.org
Tue May 13 23:28:51 CEST 2008

New submission from igs <marko at von-oppen.com>:

At least in Python 2.4 shutil.copy2() not only copies content and 
access times of a files like stated in the documentation but also the 
access bits.

That behaviour I would not expect because in other functions from 
shutil it is explicitly stated if the access bits are copied.

In fact I used
    shutil.copy2(src, dest)
    shutil.copystat(src, dest)
up to now. What does not work if the read-only attribute is set and 
what is completely nonsense after having a look into the implementation.

components: Windows
messages: 66803
nosy: igs
severity: normal
status: open
title: shutil.copy2() copies permission bits
type: behavior
versions: Python 2.4

Tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list