[issue10888] os.stat(filepath).st_mode gives wrong 'executable permission' result
Brian Curtin
report at bugs.python.org
Tue Jan 11 19:25:24 CET 2011
Brian Curtin <curtin at acm.org> 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 own world when it comes to file permissions, and there really isn't a 1-to-1 match when it comes to working in both environments.
On native Windows, "Read & Execute" has no real affect on applications, as it appears to be a synthetic permission probably constructed for that property window. I just looked at a number of definitely not executable files on my computer (e.g., text files), and they are all listed as "Read & Execute". Even by right clicking and adding a new file with a garbage name, no extension, and no contents, it's still "Read & Execute" enabled.
Additionally, there is no programmatic way to set that "Read & Execute" flag that you see in the property window.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10888>
_______________________________________
More information about the Python-bugs-list
mailing list