Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!bellcore!decvax!genrad!panda!talcott!harvard!seismo!brl-tgr!tgr!lcc.rich-wiz@UCLA-LOCUS.ARPA From: lcc.rich-wiz@UCLA-LOCUS.ARPA (Richard Mathews) Newsgroups: net.unix-wizards Subject: unix quirks (chmod 000 dir) Message-ID: <10119@brl-tgr.ARPA> Date: Mon, 22-Apr-85 17:33:29 EST Article-I.D.: brl-tgr.10119 Posted: Mon Apr 22 17:33:29 1985 Date-Received: Thu, 25-Apr-85 03:31:41 EST Sender: news@brl-tgr.ARPA Lines: 31 > Date: Fri, 12 Apr 85 08:25:12 pst > From: Dan Heller > > >>% mkdir foo > >>% chmod 000 foo > >>% cd foo > >>foo: no such file or directory > >>% WHAT? > >>no match. > > You don't seem to understand: it shouldn't say: "no such file or directory", > it should say: "Permission denied." Sorry, to rehash an old subject, but I'm a few weeks behind in my mail. Looking through my backlog, however, I do not see the correct description of the problem; so here goes. I tried this on both our Locus Distributed System and on Caltech's 4.2 system. If $cdpath is not defined, I get "Permission denied." If I do have a cdpath, I get "no such file or directory." The problem is that Csh has tried to do the "cd" relative to each directory in the cdpath and has failed each time. It then reports the LAST error it encountered. It seems to me that the best way to report errors in this case would be to report the FIRST error which is not "no such file." The "no such file" message should appear only if EVERY call to chdir() resulted in ENOENT. Richard M. Mathews Locus Computing Corporation lcc!richard@ucla-cs {ucivax,trwrb}!lcc!richard {ihnp4,randvax,sdcrdcf,ucbvax,trwspp}!ucla-cs!lcc!richard