[Python-Dev] large file support

Guido van Rossum guido@python.org
Tue, 18 Jun 2002 08:05:35 -0400


> I would be shocked if POSIX allowed a non-root user to probe file
> entries under a root/700 directory...

Exactly.  If a program is written to use access(), and subsequently
that program is used in a setuid(root) situation, access() will say
you can't access the file, but exists() will say it exists.  So
access() cannot be used to emulate exists() -- they serve different
purposes, and can return different results.

> What a paradox -- when I submitted the patch to add F_OK, you said that
> exists() did the same thing.  ;-)

Given the widespread misunderstanding of what access() does, anything
that makes using access() easier is a mistake IMO.

--Guido van Rossum (home page: http://www.python.org/~guido/)