Messages in this thread | | | Date | Sat, 25 Mar 2000 18:42:18 -0500 | From | Wakko Warner <> | Subject | Re: permission denied on exec of unexistent file? |
| |
Saw the same thing in Zsh on my laptop. I tried to execute something I knew didn't exist (randomly hitting letters on keyboard) and get permission denied. I was root at the time.
> In the /bin/blah case, bash has a fully-qualified command > name to work with, so it doesn't have to do a path search. > Rather, it proceeds directly to doing a stat or open on the > file which for some reason fails with an EPERM (I'm not going > to argue whether that's right or wrong without perusing the source). > > In the second case, bash must do a path search, so it does > stats on /path/blah for every path in your PATH. Since those > all fail, it prints that fact - i.e. command not found. Two > different mechanisms resulting in two different but understandable > error messages. > > I think the argument could be made either way. Some might > see this as two completely different scenarios, since one > involves a path search and one doesn't. Others might expect, > as it seems you do, that the base of the "problem" is really > the same, so the error messages should be the same. I can't > say as I really have a strong opinion either way. But I > figured it might help if we understand from whence cometh > the difference... > > > tw > > > > On 03/25/2000 22:12 +0100, Christoph Hellwig wrote: > >> On Sat, Mar 25, 2000 at 09:50:58PM +0200, Oleg Drokin wrote: > >> > Hello! > >> > > >> > I just found something that looks somewhat weird: > >> > mordor:~$ /bin/nonexistent_binary > >> > bash: ./nonexistent_binary: Permission denied > >> > mordor:~$ nonexistent_binary > >> > bash: nonexistent_binary: command not found > >> > >> Some issue here (smae kernel, same bash) > >> > >> > Shouldn't first attempt also say "command not found"? > >> > >> It should. > >> > >> > BASH_VERSION='2.03.0(1)-release' > >> > I'm running 2.3.99-pre3 > >> > >> Seems to be related to the fs/exec.c changes in pre3 > >> > >> > >> Christoph > >> > >> -- > >> Always remember that you are unique. Just like everyone else. > >> > >> - > >> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > >> the body of a message to majordomo@vger.rutgers.edu > >> Please read the FAQ at http://www.tux.org/lkml/ > End of included message > > > > -- > +--------------------------+------------------------------+ > | Tim Walberg | tewalberg@mediaone.net | > | 828 Marshall Ct. | www.concentric.net/~twalberg | > | Palatine, IL 60074 | | > +--------------------------+------------------------------+
-- Lab tests show that use of micro$oft causes cancer in lab animals
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |