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 ncoghlan
Recipients chrullrich, dstufft, loewis, ncoghlan, zach.ware
Date 2014-06-23.23:30:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CADiSq7cTsrEZWmQX4gj7ZLjEEC2+xXagke0u0QBd_SFF_PhNBA@mail.gmail.com>
In-reply-to <1403537732.72.0.64797422815.issue21030@psf.upfronthosting.co.za>
Content
A little additional explanation of why the switch to copytree would have
fixed this, at least in the SELinux case: under SELinux, files typically
get labelled with a context based on where they're created. Copying creates
a *new* file at the destination with the correct context for that location
(based on system policy), but moving an *existing* file will retain its
*original* context - you then have to call "restorecon" to adjust the
context for the new location.

I assume Windows NTFS ACLs are similar, being set based on the parent
directory at creation and then preserved when moved.

Moral of the story? These days, if you're relocating files to a different
directory, copying and then deleting the original will be significantly
more consistent across different environments. OS level move operations are
best avoided in cross platform code, unless it's within the same directory,
or you really need the speed and are prepared to sort out the relevant
access control tweaks afterwards.
History
Date User Action Args
2014-06-23 23:30:10ncoghlansetrecipients: + ncoghlan, loewis, zach.ware, dstufft, chrullrich
2014-06-23 23:30:10ncoghlanlinkissue21030 messages
2014-06-23 23:30:09ncoghlancreate