test -r or -x always return false on an NFS mount?

Mario Emmenlauer mario@emmenlauer.de
Wed Oct 14 14:57:56 GMT 2020


On 14.10.20 13:50, Corinna Vinschen wrote:
> On Oct 14 11:06, Mario Emmenlauer wrote:
>> On 14.10.20 10:28, Corinna Vinschen wrote:
>>> Actually, not really.  It's weird in fact, given ls(1) shows the
>>> desired result.  That would point to a bug in access(2), but there's
>>> no special code in access(2) for NFS.  For filesystems not supporting
>>> ACLs (FAT, NFS, etc), it calls stat(2) and checks the st_mode bits
>>> against the requested access(2) mode based on the uid/gid of the
>>> caller, simple as that.
>>
>> Hmm, now that you mention it, I just coincidentally found an issue
>> with the `_stat` call in Microsoft Windows 2004 update. In the Apache
> 
> This is entirely unrelated.  We're talking about Cygwin stat(2),
> not msvcrt.dll _stat().  Different source, different call.

Yes, but Cygwin stat is implemented based on the Win32 posix layer too,
or not? At least I got this impression from browsing the sources -
albeit admittedly there are far too many indirections and ifdefs for
me to really know what's going on... :-) :-)

All the best,

    Mario


More information about the Cygwin mailing list