unix quirks (chmod 000 dir)
BALDWIN
mike at whuxl.UUCP
Mon Apr 22 04:56:17 AEST 1985
> >>% mkdir foo
> >>% chmod 000 foo
> >>% cd foo
> >>foo: no such file or directory
>You don't seem to understand: it shouldn't say: "no such file or directory",
>it should say: "Permission denied." The example, was just that, an example.
Sorry, folks, but the REAL answer to this is the cdpath variable. If it can't
chdir somewhere, csh will go down $cdpath, and the error message you end up
getting is that of the LAST component in cdpath:
% mkdir rc
% chmod 0 rc
% set cdpath = (. /etc)
% cd rc
rc: Not a directory
% set cdpath = (/etc .)
% cd rc
rc: Permission denied
If cdpath is unset, you will always get the "right" error message.
Michael Baldwin
AT&T Bell Labs
harpo!whuxl!mike
More information about the Comp.unix.wizards
mailing list