MAKEDEV bad interpreter: Permission denied

Gerard Beekmans gerard at linuxfromscratch.org
Mon Mar 25 08:44:12 PST 2002


On Sat, Mar 23, 2002 at 01:58:21AM -0500, Balazs O. Czifra wrote:
> Any idea why I am getting the following error (actually, about 20 of the
> same error each time) upon running sh?
> root:/usr/src# sh ./MAKEDEV-1.4 -v generic:
> ./MAKEDEV-1.4: /bin/sh: bad interpreter: Permission denied

Start here in the FAQ:
	http://www.linuxfromscratch.org/faq/#AEN141

Here are a few more things to check for. Seth, can this be added to the FAQ
too please under section 4.1.1.1 (edit it a bit, remove some remarks like
"unless you meant to do it....")

Check the permissions on the /bin/sh file it's trying to execute. It's
supposed to be a symlink to /bin/bash and /bin/bash should have a mode of
755. If /bin/sh isn't a symlink then check if it has mode 755 as well
(though you probably want it to be a symlink to /bin/bash unless you
changed this on purpose).

Another reason this can happen if the script you are trying to execute
doesn't have the executable bit set. It will still complain about /bin/sh
permission denied, but it actually means that the script you try to run
isn't executable:

gerard at gwaihir:~/tmp$ ./testscript 
testing script

gerard at gwaihir:~/tmp$ chmod -x testscript 
gerard at gwaihir:~/tmp$ ./testscript 

bash: ./testscript: /bin/sh: bad interpreter: Permission denied
gerard at gwaihir:~/tmp$ chmod +x testscript

gerard at gwaihir:~/tmp$ ./testscript 
testing script



-- 
Gerard Beekmans
www.linuxfromscratch.org

-*- If Linux doesn't have the solution, you have the wrong problem -*-
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-support' in the subject header of the message



More information about the lfs-support mailing list