Bad Interpreter: Permission Denied Messages

I have just updated my system from openSuSE 11.0 to 11.1 and am re-installing some software that I have always had installed on prior systems with no problem. I am now getting the message “/bin/sh: bad interpreter: Permission denied” message when trying to do this like a ‘configure’ command.

An example of the output is:
dmc55@dmcLinux00:/data/App_Software/krecipes-1.0-beta1> ./configure
bash: ./configure: /bin/sh: bad interpreter: Permission denied

configure is set for executable as shown here:
-rwxr-xr-x 1 dmc55 users 1148082 2006-09-01 22:12 configure

and my ID is the owner of the directory path leading. I have tried running with the ‘su’ command as well as my own ID and I receive the same error.

Anyone have any ideas?

Thanks.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Where did you copy the ‘configure’ file from? Has it been on windows
lately? Running as root isn’t going to help you if you are getting a
problem with the interpreter vs. rights. Post the output to the
following command:

file ./configure

If that says it’s some kind of dos/windows file then run dos2unix on the
file and try again:

dos2unix
file ./configure

If it’s better then try running it as usual.

Good luck.

DMCorsa wrote:
> I have just updated my system from openSuSE 11.0 to 11.1 and am
> re-installing some software that I have always had installed on prior
> systems with no problem. I am now getting the message “/bin/sh: bad
> interpreter: Permission denied” message when trying to do this like a
> ‘configure’ command.
>
> An example of the output is:
> dmc55@dmcLinux00:/data/App_Software/krecipes-1.0-beta1> ./configure
> bash: ./configure: /bin/sh: bad interpreter: Permission denied
>
> configure is set for executable as shown here:
> -rwxr-xr-x 1 dmc55 users 1148082 2006-09-01 22:12 configure
>
> and my ID is the owner of the directory path leading. I have tried
> running with the ‘su’ command as well as my own ID and I receive the
> same error.
>
> Anyone have any ideas?
>
> Thanks.
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJeNu73s42bA80+9kRAvW8AJwKvVSnQ6fSwp7z7/jgaeROTqSz1QCeKsax
NWrYUDRjLTCLuD1AhhoMOic=
=8Pg5
-----END PGP SIGNATURE-----

Here is the output of the file command:
dmc55@dmcLinux00:/data/App_Software/krecipes-1.0-beta1> file ./configure
./configure: POSIX shell script text

The file came from a tar file I got from kde-apps.org and have used it before on prior installs. I got the same bad interpreter message when I tried to do a make on a gspca webcam package from their site.

I’ve never had this issue before on any of the prior versions of openSuSE, so I’m puzzled.

Thanks for the reply.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

How about:

head -1 ./configure | hexdump

Good luck.

DMCorsa wrote:
> ab@novell.com;1932094 Wrote:
> Where did you copy the ‘configure’ file from? Has it been on windows
> lately? Running as root isn’t going to help you if you are getting a
> problem with the interpreter vs. rights. Post the output to the
> following command:
>
> file ./configure
>
> If that says it’s some kind of dos/windows file then run dos2unix on
> the
> file and try again:
>
> dos2unix
> file ./configure
>
> If it’s better then try running it as usual.
>
> Good luck.
>
>
>
>
>
>
> DMCorsa wrote:
>>>> I have just updated my system from openSuSE 11.0 to 11.1 and am
>>>> re-installing some software that I have always had installed on prior
>>>> systems with no problem. I am now getting the message “/bin/sh: bad
>>>> interpreter: Permission denied” message when trying to do this like a
>>>> ‘configure’ command.
>>>>
>>>> An example of the output is:
>>>> dmc55@dmcLinux00:/data/App_Software/krecipes-1.0-beta1> ./configure
>>>> bash: ./configure: /bin/sh: bad interpreter: Permission denied
>>>>
>>>> configure is set for executable as shown here:
>>>> -rwxr-xr-x 1 dmc55 users 1148082 2006-09-01 22:12 configure
>>>>
>>>> and my ID is the owner of the directory path leading. I have tried
>>>> running with the ‘su’ command as well as my own ID and I receive the
>>>> same error.
>>>>
>>>> Anyone have any ideas?
>>>>
>>>> Thanks.
>>>>
>>>>
> Here is the output of the file command:
> dmc55@dmcLinux00:/data/App_Software/krecipes-1.0-beta1> file
> ./configure
> ./configure: POSIX shell script text

> The file came from a tar file I got from kde-apps.org and have used it
> before on prior installs. I got the same bad interpreter message when I
> tried to do a make on a gspca webcam package from their site.

> I’ve never had this issue before on any of the prior versions of
> openSuSE, so I’m puzzled.

> Thanks for the reply.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJePNK3s42bA80+9kRAjauAJ0THt+aq3NUJkEAb83pvt7SO7tzKwCdG2G0
Sofb96cEHjoXBp1HDYnzIfM=
=uyMb
-----END PGP SIGNATURE-----

Here is the output of the head -1 command

dmc55@dmcLinux00:/data/App_Software/krecipes-1.0-beta1> head -1 ./configure
#! /bin/sh

Thanks.

In addition, I just tried running giving it ‘sh .configure’ - Here is the output from that. I have the gcc package installed and I tried this giving ‘su’ first as well as my own ID with the same result.

dmc55@dmcLinux00:/data/App_Software/krecipes-1.0-beta1> sh ./configure
checking build system type… x86_64-unknown-linux-gnu
checking host system type… x86_64-unknown-linux-gnu
checking target system type… x86_64-unknown-linux-gnu
checking for a BSD-compatible install… /usr/bin/install -c
checking for -p flag to install… yes
checking whether build environment is sane… yes
checking for gawk… gawk
checking whether make sets $(MAKE)… yes
checking for kde-config… /opt/kde3/bin/kde-config
checking where to install… /opt/kde3 (as returned by kde-config)
checking for style of include used by make… GNU
checking for gcc… gcc
checking for C compiler default output file name… a.out
checking whether the C compiler works… configure: error: cannot run C compiled programs.
If you meant to cross compile, use --host'. See config.log’ for more details.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The reason it isn’t working is that you have a space in there after the ‘!’.

Good luck.

DMCorsa wrote:
> Here is the output of the head -1 command
>
> dmc55@dmcLinux00:/data/App_Software/krecipes-1.0-beta1> head -1
> ./configure
> #! /bin/sh
>
> Thanks.
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJe0ru3s42bA80+9kRAp0aAKCEic14U/3xpvDoOckczx6NBa69RACeP8ri
fsGfGkeambRWxkmeDd7kAvI=
=4G2I
-----END PGP SIGNATURE-----

No that’s not true. The #! mechanism works fine even with a space. Try this script:

#! /usr/bin/perl -w

print "Hello world
";

My guess is that /data is a partition that is mounted with noexec.

AH! That looks to be it, except now I don’t know how to change it. I looked in fstab and this is how my fstab looks:

dmc55@dmcLinux00:/etc> more fstab
/dev/disk/by-id/ata-HDS722525VLSA80_VN6JNRCFF1J5AE-part6 swap swap defaults 0 0
/dev/disk/by-id/ata-HDS722525VLSA80_VN6JNRCFF1J5AE-part7 / ext3 acl,user_xattr 1 1
/dev/disk/by-id/ata-HDS722525VLSA80_VN6JNRCFF1J5AE-part5 /boot ext3 acl,user_xattr 1 2
/dev/mapper/sil_ajabcfcfcaca_part1 /data ext3 user,acl,user_xattr 1 2
/dev/disk/by-id/ata-HDS722525VLSA80_VN6JNRCFF1J5AE-part11 /home ext3 acl,user_xattr 1 2
/dev/disk/by-id/ata-HDS722525VLSA80_VN6JNRCFF1J5AE-part10 /opt ext3 acl,user_xattr 1 2
/dev/disk/by-id/ata-HDS722525VLSA80_VN6JNRCFF1J5AE-part8 /usr ext3 acl,user_xattr 1 2
/dev/disk/by-id/ata-HDS722525VLSA80_VN6JNRCFF1J5AE-part9 /var ext3 acl,user_xattr 1 2
/dev/disk/by-id/ata-HDS722525VLSA80_VN6JNRCFF1J5AE-part1 /windows/C ntfs-3g user,noauto,users,gid=users,
fmask=133,dmask=022,locale=en_US.UTF-8 0 0
/dev/disk/by-id/ata-ST3500641AS_3PM00J4F-part1 /windows/D ntfs-3g user,noauto,users,gid=users,fmask=133,
dmask=022,locale=en_US.UTF-8 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0

The parition is mounted as /data and notice that it is a hardware RAID 0 setup.

When I issue a mount command it shows mounted with noexec as below:

dmc55@dmcLinux00:/etc> mount
/dev/sda7 on / type ext3 (rw,acl,user_xattr)
/proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
debugfs on /sys/kernel/debug type debugfs (rw)
udev on /dev type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/sda5 on /boot type ext3 (rw,acl,user_xattr)
/dev/mapper/sil_ajabcfcfcaca_part1 on /data type ext3 (rw,noexec,nosuid,nodev,acl,user_xattr)
/dev/sda11 on /home type ext3 (rw,acl,user_xattr)
/dev/sda10 on /opt type ext3 (rw,acl,user_xattr)
/dev/sda8 on /usr type ext3 (rw,acl,user_xattr)
/dev/sda9 on /var type ext3 (rw,acl,user_xattr)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
securityfs on /sys/kernel/security type securityfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/proc on /var/lib/ntp/proc type proc (ro)

I went in the partitioner tool in YaST and didn’t see any fstab options set there where you could even state noexec.

Where do I change it?

Thanks. BTW this would also explain why I get that bad interpreter message on a totally different ‘make’ I tried to do on a gspca package to try to get my webcam to work since that’s broken too. The package is also on the same partition.

Put ,exec after user on that line. The option user implicitly turns off exec. See man 8 mount.

Got it! I actually went in to the Partioner tool in YaST and selected the mapping for the RAID and under fstab options in the arbitrary value field I entered ‘exec’.

Works now! Yay! Thanks to all for the help and responses. New one to me, never had to do that with any previous install of openSuSE.

1 issue down. lol!