[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Strange diagnostic



Hi,

On Mon, Jan 27, 2003 at 03:10:22PM +0300, Nikita V. Youshchenko wrote:

> nikita@zigzag:~> cat t
> #!/bin/bash
> echo "XXX"
> nikita@zigzag:~> su
> Password:
> root@zigzag:/home/nikita> chmod 744 t
> root@zigzag:/home/nikita> ./t
> XXX
> root@zigzag:/home/nikita> exit
> nikita@zigzag:~> ./t
> bash: ./t: /bin/bash: bad interpreter: Permission denied
> 
> Doesn't this demonstrate the bug cleanly?

I don't see a bug, other than an error message that's a bit vague.

Presumably, what happens in the kernel is that there is a binary 'and'
being performed between t's permission bits and the interpreter's, and
that it looks at the resulting permission bits (instead of the interpreter's
own permission bits) when checking whether the user has execute
permissions on the interpreter.

That would explain the 'bad interpreter: Permission denied' being issued.

Cheers,


Emile.

-- 
E-Advies / Emile van Bergen   |   emile@e-advies.info
tel. +31 (0)70 3906153        |   http://www.e-advies.info



Reply to: