strange interaction between open and cwd

Baz Walter bazwal at ftml.net
Tue May 4 09:03:55 EDT 2010


On 04/05/10 03:19, Grant Edwards wrote:
> On 2010-05-03, Baz Walter<bazwal at ftml.net>  wrote:
>> On 03/05/10 19:12, Grant Edwards wrote:
>>> Even though the user provided a legal and openable path?
>>
>> that sounds like an operational definition to me: what's the
>> difference between "legal" and "openable"?
>
> Legal as in meets the syntactic requirements for a path (not sure if
> there really are any requirements other than it being a
> null-terminated string).  Openable meaning that it denotes a path file
> that exists and for which the caller has read permissions on the file
> and execute premissions on the directories within the path.

openable is not the same as accessible. a file can still openable, even 
though a user may not have permission to access it.

a better definition of "legal path" might be whether any useful 
information can be gained from a stat() call on it.



More information about the Python-list mailing list