Error message on mode 0 directory nonsense

Michael C. Berch mcb at lll-tis-gw
Tue Apr 23 07:03:12 AEST 1985


> From: mfe at leadsv.UUCP (Mark Ellson)
> In his article, ucscc!argv (Dan Heller) argues that the appropriate error
> message when you try to change directory into a directory for which you don't
> have permissions is "Permission denied" instead of "no such file or
> directory".  In fact, while this may be clearer to the user, it falls in the
> same general category as not using "Incorrect password" or "Incorrect
> username" for failed logins.  You never want to tell a potential intruder or
> unauthorized user any information which can be used to infer the existence
> or nonexistence of a protected object.

Yes, but if you have read & execute permission on the "mystery"
directory's parent (which is likely if you are in the position to
issue the command "cd foo") you can obviously do a long listing
of the parent and see the whole scoop on the mystery directory
and its mode, etc.

To put an error message here that is at best disingenuous and at
worst WRONG, for the mere purpose of stonewalling the enemy is like
printing up incorrect street maps of Washington to confuse the Ruskies.

Michael C. Berch
mcb at lll-tis.ARPA
{akgua,allegra,cbosgd,decwrl,dual,ihnp4,sun}!idi!styx!mcb



More information about the Comp.unix.wizards mailing list