[issue10888] os.stat(filepath).st_mode gives wrong 'executable permission' result

2013-10-13 Thread Georg Brandl
Georg Brandl added the comment: Closing as suggested. -- nosy: +georg.brandl resolution: -> wont fix status: pending -> closed ___ Python tracker ___ ___

[issue10888] os.stat(filepath).st_mode gives wrong 'executable permission' result

2012-10-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue10888] os.stat(filepath).st_mode gives wrong 'executable permission' result

2011-04-19 Thread Tim Golden
Tim Golden added the comment: FWIW I agree with MvL: os.stat is one of those awkward customers left over from the idea that Windows could be posix-compliant, even though the relevant concepts don't actually map particularly well. ISTM that anyone seriously wanting to determine whether something'

[issue10888] os.stat(filepath).st_mode gives wrong 'executable permission' result

2011-04-18 Thread Martin v . Löwis
Martin v. Löwis added the comment: Jeroen: I'm tempted to close this issue with no change. The code, as it stands, models what Microsoft does in it's CRT (see crt/src/stat.c:__tdtoxmode). There is also a straight-forward motivation to this: this is the list of extensions that you can pass to

[issue10888] os.stat(filepath).st_mode gives wrong 'executable permission' result

2011-04-18 Thread Sijin Joseph
Sijin Joseph added the comment: >From reading http://support.microsoft.com/kb/899147 it does look like the .dll >extension needs to have the "Read & Execute" permission in order to have code >from the .dll be executed. It's odd that there isn't documentation that's >easily searchable to confi

[issue10888] os.stat(filepath).st_mode gives wrong 'executable permission' result

2011-01-11 Thread Brian Curtin
Brian Curtin added the comment: I meant that it doesn't have any effect because it's apparently always set from what I could see, which was poor wording. The TechNet article also made a similar claim. If it is ever not set, then the file clearly can't be executed. --

[issue10888] os.stat(filepath).st_mode gives wrong 'executable permission' result

2011-01-11 Thread Martin v . Löwis
Martin v. Löwis added the comment: Brian: "On native Windows, "Read & Execute" has no real affect on applications". Why do you say that? The FILE_EXECUTE permission certainly has a meaning on Windows, see http://msdn.microsoft.com/en-us/library/gg258116(v=vs.85).aspx I agree that FILE_EXECUT

[issue10888] os.stat(filepath).st_mode gives wrong 'executable permission' result

2011-01-11 Thread Brian Curtin
Brian Curtin added the comment: > The actual issue was initially detected when observing that the > 'tarfile' package produced a tar containing different permissions, > depending on the script being executed by 'cygwin python' or 'native python'. I would expect that. Each of those work in their

[issue10888] os.stat(filepath).st_mode gives wrong 'executable permission' result

2011-01-11 Thread Jeroen Dobbelaere
Jeroen Dobbelaere added the comment: Some more background: The actual issue was initially detected when observing that the 'tarfile' package produced a tar containing different permissions, depending on the script being executed by 'cygwin python' or 'native python'. When using native python

[issue10888] os.stat(filepath).st_mode gives wrong 'executable permission' result

2011-01-11 Thread Brian Curtin
Brian Curtin added the comment: The "Read & Execute" permission listed on a file's property window doesn't really mean anything. Executables only need read permissions [0] to actually be executed. Additionally, in terms of _stat, Windows does its check by extension [1] but they don't specify

[issue10888] os.stat(filepath).st_mode gives wrong 'executable permission' result

2011-01-11 Thread dobbelaj
New submission from dobbelaj : The 'os.stat' method on windows seems to be hardcoded to check the file name extension when computing the 'executable permission flag' (st_mode). (See Modules/posixmodule.c: win32_stat and win32_wstat) Currently, it checks for : '.bat', '.cmd', '.exe', '.com'