[sf-perl] Bug in perl (or does -r not do what I think?)

David Alban extasia at extasia.org
Fri Jun 6 14:01:09 PDT 2008

"...depends on what the meaning of 'is' is..."

then what does it mean for the file to be readable?

    it's file mode indicates some user,group or the entire world can read it


    some real user (whether root or not) can actually read it

apparently there are situations where these aren't the same.

On Fri, Jun 6, 2008 at 1:49 PM, Dan Boger <dan at peeron.com> wrote:
> I believe this is *only* on an NFS filesystem with root_squash.  I guess it
> counts as a local-filesystem according to the manpage:
>                Also note that, for the superuser on the local filesystems,
> the "-r", "-R", "-w", and
>                "-W" tests always return 1, and "-x" and "-X" return 1 if any
> execute bit is set in the
>                mode.  Scripts run by the superuser may thus need to do a
> stat() to determine the
>                actual mode of the file, or temporarily set their effective
> uid to something else.

Live in a world of your own, but always welcome visitors.

More information about the SanFrancisco-pm mailing list