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 Anders.Østhus
Recipients Anders.Østhus, brian.curtin, pitrou, tarek
Date 2011-02-12.19:54:05
SpamBayes Score 7.3957895e-11
Marked as misclassified No
Message-id <1297540446.76.0.258501136862.issue11202@psf.upfronthosting.co.za>
In-reply-to
Content
Ok, but the whole page you linked to (http://docs.python.org/library/shutil) confuses me then.

It states at the top:
"Warning

Even the higher-level file copying functions (copy(), copy2()) can’t copy all file metadata.

On POSIX platforms, this means that file owner and group are lost as well as ACLs. On Mac OS, the resource fork and other metadata are not used. This means that resources will be lost and file type and creator codes will not be correct. On Windows, file owners, ACLs and alternate data streams are not copied."

Then, under shutil.copy: "Permission bits are copied". I'm assuming this is UGO permissions on POSIX systems, and thus correct according to the top text.

shutil.copy2 says: Similar to shutil.copy, but with metadata.

Files copied with both shutil.copy and shutil.copy2 both inherits the permissions from their destination, but shutil.move does not.

According to the shutil doc page, neither copy or copy2 should do this. And since they do, and you say shutil.move is implemented using shutil.copy2, shouldn't files moved with shutil.move also then inherit the permissions?
History
Date User Action Args
2011-02-12 19:54:06Anders.Østhussetrecipients: + Anders.Østhus, pitrou, tarek, brian.curtin
2011-02-12 19:54:06Anders.Østhussetmessageid: <1297540446.76.0.258501136862.issue11202@psf.upfronthosting.co.za>
2011-02-12 19:54:06Anders.Østhuslinkissue11202 messages
2011-02-12 19:54:05Anders.Østhuscreate