[issue11202] Win32: shutil.move does not inherit permissions

2011-02-12 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue11202] Win32: shutil.move does not inherit permissions

2011-02-12 Thread Anders Østhus
Anders Østhus added the comment: Thank you for taking the time to explain it to me, but it still seems inconsistent to me. I did a test with the functions copy, copy2, move, os.rename, copyfile, both on the same filesystem and another filesystem, and the result is: Same filesystem: s

[issue11202] Win32: shutil.move does not inherit permissions

2011-02-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: > On my system (Win Server 2008 R2 64-Bit, Python 2.7.1), when I use > copy, copy2 or move(to another filesystem), the file _will_ get the > ACL of the DST folder, and remove any ACL in SRC file that the DST > folder does not have. > > Thus, it doesn't copy it

[issue11202] Win32: shutil.move does not inherit permissions

2011-02-12 Thread Anders Østhus
Anders Østhus added the comment: On my system (Win Server 2008 R2 64-Bit, Python 2.7.1), when I use copy, copy2 or move(to another filesystem), the file _will_ get the ACL of the DST folder, and remove any ACL in SRC file that the DST folder does not have. Thus, it doesn't copy it from the so

[issue11202] Win32: shutil.move does not inherit permissions

2011-02-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Ok. > > But that makes the whole method inconsistent. > > Basically, if it's on the same filesystem, rename the file, and thus > not inheriting ACL. If it's on another use copy2, and inherit ACL. I think you're misunderstanding copy2. It will copy the ACL f

[issue11202] Win32: shutil.move does not inherit permissions

2011-02-12 Thread Anders Østhus
Anders Østhus added the comment: Ok. But that makes the whole method inconsistent. Basically, if it's on the same filesystem, rename the file, and thus not inheriting ACL. If it's on another use copy2, and inherit ACL. That makes no sense, atleast not to me :) -- __

[issue11202] Win32: shutil.move does not inherit permissions

2011-02-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: > 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? There's a misunderstanding I

[issue11202] Win32: shutil.move does not inherit permissions

2011-02-12 Thread Anders Østhus
Anders Østhus added the comment: 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 fil

[issue11202] Win32: shutil.move does not inherit permissions

2011-02-12 Thread Brian Curtin
Changes by Brian Curtin : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue11202] Win32: shutil.move does not inherit permissions

2011-02-12 Thread Brian Curtin
Brian Curtin added the comment: shutil.move is implemented using copy2, which as the documentation states at the top, "On Windows, file owners, ACLs and alternate data streams are not copied." See http://docs.python.org/library/shutil -- nosy: +brian.curtin resolution: -> rejected s

[issue11202] Win32: shutil.move does not inherit permissions

2011-02-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Intuitively, this seems rather normal to me. If I move a file under Unix, I don't expect its access rights or ownership to change. "Move" really means what it means: you have to update its permission explicitly if that's what you need (shutil.copystat() can h

[issue11202] Win32: shutil.move does not inherit permissions

2011-02-12 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- components: +Library (Lib) -IO nosy: +tarek ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue11202] Win32: shutil.move does not inherit permissions

2011-02-12 Thread Anders Østhus
New submission from Anders Østhus : Hi I'm running Python 2.7.1 (r271:86832, Nov 27 2010, 17:19:03) [MSC v.1500 64 bit (AMD64)] on win32 (Server 2008 R2). I've discovered that when moving files with shutil.move, the file won't inherit the security settings as it should. When using shutil.cop