bash's "test" builtin can report the wrong results in many circumstances (e.g. read-only filesystems, noexec filesystems, ACLs, NFS, AFS, setuid executables, etc) because it uses stat() rather than access() for the unary -w, -r, -x, etc.
This has come up before: http://lists.gnu.org/archive/html/bug-bash/2003-02/msg00028.html http://www.cygwin.com/ml/cygwin-patches/2003-q1/msg00258.html and it looks like the behavior of coreutils was fixed in the Feb 2003 4.5.8 release (with the patch in the link to the bug-bash post above). However, the fix didn't seem to make its way into bash (at least as of 3.1). So now bash's builtin test behaves differently from the test binary from coreutils (or from Solaris and others, for that matter), and it behaves wrongly to boot. Could the eaccess/euidaccess code from coreutils be imported into bash to resolve this? _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash