public inbox for gentoo-amd64@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-amd64] Unable to execute binary files on CLI
@ 2008-11-13  8:30 Tonko Mulder
  2008-11-13  9:27 ` Nadav Horesh
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Tonko Mulder @ 2008-11-13  8:30 UTC (permalink / raw
  To: gentoo-amd64

Hello list,

for some reason I'm unable to execute binary files and script files
(e.g. bash/sh/python).
If I put the interpreter in front of the shell script then I'm able to
execute the file, but I'm unable to run it as one would normal run it.

tonko@Gaius ~/ib2007/bin $ file ib2007ux
ib2007ux: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.0.0, stripped
tonko@Gaius ~/ib2007/bin $ ./ib2007ux
-bash: ./ib2007ux: Access denied

That's the output I get when trying to execute a binary file.

The next is when I try to execute a script file, in this case it's a
python script but same goes for every other.

tonko@Gaius ~/Dev/repo/arandr $ ./arandr
-bash: ./arandr: /usr/bin/env: bad interpreter: Access denied

I'm rather clueless on what might have caused this, so any help would
be very appreciated.
As a final resort I changed my CFLAGS from -Os to -O2 as is standard.

My emerge --info is at http://www.xs4all.nl/~mtonko/emerge.info
uname -a : Linux Gaius 2.6.26-gentoo-r1 #5 SMP Tue Nov 11 13:41:10 CET
2008 x86_64 AMD Athlon(tm) 64 X2 Dual-Core Processor TK-55
AuthenticAMD GNU/Linux


-- 
Regards,
Tonko



^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [gentoo-amd64] Unable to execute binary files on CLI
  2008-11-13  8:30 [gentoo-amd64] Unable to execute binary files on CLI Tonko Mulder
@ 2008-11-13  9:27 ` Nadav Horesh
  2008-11-13 10:04   ` Tonko Mulder
  2008-11-13 10:20 ` [gentoo-amd64] " Duncan
  2008-11-13 10:52 ` [gentoo-amd64] " Volker Armin Hemmann
  2 siblings, 1 reply; 9+ messages in thread
From: Nadav Horesh @ 2008-11-13  9:27 UTC (permalink / raw
  To: gentoo-amd64

[-- Attachment #1: Type: text/plain, Size: 1609 bytes --]

Do you have an execution permission for ib2007ux or the directory it resides?

arandr: what is the first line in the file?
        maybe you are missing the file /usr/bin/env?

Nadav

-----הודעה מקורית-----
מאת: Tonko Mulder [mailto:tonko.mulder@gmail.com]
נשלח: ה 13-נובמבר-08 10:30
אל: gentoo-amd64@lists.gentoo.org
נושא: [gentoo-amd64] Unable to execute binary files on CLI
 
Hello list,

for some reason I'm unable to execute binary files and script files
(e.g. bash/sh/python).
If I put the interpreter in front of the shell script then I'm able to
execute the file, but I'm unable to run it as one would normal run it.

tonko@Gaius ~/ib2007/bin $ file ib2007ux
ib2007ux: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.0.0, stripped
tonko@Gaius ~/ib2007/bin $ ./ib2007ux
-bash: ./ib2007ux: Access denied

That's the output I get when trying to execute a binary file.

The next is when I try to execute a script file, in this case it's a
python script but same goes for every other.

tonko@Gaius ~/Dev/repo/arandr $ ./arandr
-bash: ./arandr: /usr/bin/env: bad interpreter: Access denied

I'm rather clueless on what might have caused this, so any help would
be very appreciated.
As a final resort I changed my CFLAGS from -Os to -O2 as is standard.

My emerge --info is at http://www.xs4all.nl/~mtonko/emerge.info
uname -a : Linux Gaius 2.6.26-gentoo-r1 #5 SMP Tue Nov 11 13:41:10 CET
2008 x86_64 AMD Athlon(tm) 64 X2 Dual-Core Processor TK-55
AuthenticAMD GNU/Linux


-- 
Regards,
Tonko



[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 3569 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-amd64] Unable to execute binary files on CLI
  2008-11-13  9:27 ` Nadav Horesh
@ 2008-11-13 10:04   ` Tonko Mulder
  0 siblings, 0 replies; 9+ messages in thread
From: Tonko Mulder @ 2008-11-13 10:04 UTC (permalink / raw
  To: gentoo-amd64

The execution permission for ib2007 is set on the file and on the dir
it resides.

The first line in the arandr file is: #!/usr/bin/env python and that
is present on my system.
tonko@Gaius ~/ $ which env
/usr/bin/env


On Thu, Nov 13, 2008 at 10:27 AM, Nadav Horesh <nadavh@visionsense.com> wrote:
> Do you have an execution permission for ib2007ux or the directory it resides?
>
> arandr: what is the first line in the file?
>        maybe you are missing the file /usr/bin/env?
>
> Nadav
>
> -----הודעה מקורית-----
> מאת: Tonko Mulder [mailto:tonko.mulder@gmail.com]
> נשלח: ה 13-נובמבר-08 10:30
> אל: gentoo-amd64@lists.gentoo.org
> נושא: [gentoo-amd64] Unable to execute binary files on CLI
>
> Hello list,
>
> for some reason I'm unable to execute binary files and script files
> (e.g. bash/sh/python).
> If I put the interpreter in front of the shell script then I'm able to
> execute the file, but I'm unable to run it as one would normal run it.
>
> tonko@Gaius ~/ib2007/bin $ file ib2007ux
> ib2007ux: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
> dynamically linked (uses shared libs), for GNU/Linux 2.0.0, stripped
> tonko@Gaius ~/ib2007/bin $ ./ib2007ux
> -bash: ./ib2007ux: Access denied
>
> That's the output I get when trying to execute a binary file.
>
> The next is when I try to execute a script file, in this case it's a
> python script but same goes for every other.
>
> tonko@Gaius ~/Dev/repo/arandr $ ./arandr
> -bash: ./arandr: /usr/bin/env: bad interpreter: Access denied
>
> I'm rather clueless on what might have caused this, so any help would
> be very appreciated.
> As a final resort I changed my CFLAGS from -Os to -O2 as is standard.
>
> My emerge --info is at http://www.xs4all.nl/~mtonko/emerge.info
> uname -a : Linux Gaius 2.6.26-gentoo-r1 #5 SMP Tue Nov 11 13:41:10 CET
> 2008 x86_64 AMD Athlon(tm) 64 X2 Dual-Core Processor TK-55
> AuthenticAMD GNU/Linux
>
>
> --
> Regards,
> Tonko
>
>
>



-- 
Tonko

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [gentoo-amd64]  Re: Unable to execute binary files on CLI
  2008-11-13  8:30 [gentoo-amd64] Unable to execute binary files on CLI Tonko Mulder
  2008-11-13  9:27 ` Nadav Horesh
@ 2008-11-13 10:20 ` Duncan
  2008-11-13 10:52 ` [gentoo-amd64] " Volker Armin Hemmann
  2 siblings, 0 replies; 9+ messages in thread
From: Duncan @ 2008-11-13 10:20 UTC (permalink / raw
  To: gentoo-amd64

"Tonko Mulder" <tonko.mulder@gmail.com> posted
43ba12950811130030h6405b74aia30fff4b38424383@mail.gmail.com, excerpted
below, on  Thu, 13 Nov 2008 09:30:09 +0100:

> for some reason I'm unable to execute binary files and script files
> (e.g. bash/sh/python).
> If I put the interpreter in front of the shell script then I'm able to
> execute the file, but I'm unable to run it as one would normal run it.

Three possibilities (in addition to what Nadav already mentioned, user 
exec permissions and a missing or corrupted /usr/bin/env):

1:  Mount options.  At one point some years ago (back on Mandrake) I had /
tmp mounted noexec, forgot about it, and then had something (I actually 
wanted) try to run from there.  I was rather new to Linux at the time, 
and checked permissions and all sorts of stuff I thought /might/ be the 
problem, before I figured it out.  "Doh!" <said while smacking my 
forehead> "Of /course/ it can't execute, /tmp's mounted noexec!

So I don't know your file system volume layout, but if it's happening on 
only one mounted volume, that could be your problem.

2:  Kernel executable type options:

In menuconfig, under Executable file formats / Emulations, verify that 
IE32 Emulation is turned on (IA32_EMULATION=y in your .config, I noted 
that the file report you posted said ELF 32-bit, and this is of course an 
amd64 list so I'm assuming a 64-bit kernel and main system, you'll need 
that 32-bit kernel option enabled to run 32-bit code).

For certain types of executables you may need Kernel support for MISC 
binaries (BINFMT_MISC), located in the same submenu, turned on (and its 
pseudofs mounted) as well.  I don't have it turned on here and haven't 
run into problems, but read the associated help anyway, and if necessary, 
the other documentation it mentions.

3. If it's 32-bit you're looking at, perhaps your multilib config is 
messed up.  But since I don't do servitudeware (see the sig) and all the 
freedomware I run has been ported to amd64 for quite some time, I have no 
reason for multilib and thus run the 64-bit-only no-multilib profile, so 
I'll be of little help in that regard.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-amd64] Unable to execute binary files on CLI
  2008-11-13  8:30 [gentoo-amd64] Unable to execute binary files on CLI Tonko Mulder
  2008-11-13  9:27 ` Nadav Horesh
  2008-11-13 10:20 ` [gentoo-amd64] " Duncan
@ 2008-11-13 10:52 ` Volker Armin Hemmann
  2008-11-13 11:18   ` Tonko Mulder
  2 siblings, 1 reply; 9+ messages in thread
From: Volker Armin Hemmann @ 2008-11-13 10:52 UTC (permalink / raw
  To: gentoo-amd64

On Thursday 13 November 2008, Tonko Mulder wrote:
> Hello list,
>
> for some reason I'm unable to execute binary files and script files
> (e.g. bash/sh/python).
> If I put the interpreter in front of the shell script then I'm able to
> execute the file, but I'm unable to run it as one would normal run it.
>
> tonko@Gaius ~/ib2007/bin $ file ib2007ux
> ib2007ux: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
> dynamically linked (uses shared libs), for GNU/Linux 2.0.0, stripped
> tonko@Gaius ~/ib2007/bin $ ./ib2007ux
> -bash: ./ib2007ux: Access denied
>
do you have support for 32bit exes in your kernel?



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-amd64] Unable to execute binary files on CLI
  2008-11-13 10:52 ` [gentoo-amd64] " Volker Armin Hemmann
@ 2008-11-13 11:18   ` Tonko Mulder
  2008-11-13 11:22     ` Tonko Mulder
  0 siblings, 1 reply; 9+ messages in thread
From: Tonko Mulder @ 2008-11-13 11:18 UTC (permalink / raw
  To: gentoo-amd64

First my fstab:
/dev/sda4		/		xfs		noatime	0 1
/dev/data/home		/home		xfs		defaults	0 2
/dev/sda3		none		swap		sw		0 0
/home/swap.img		none		swap		sw		0 0
/home/OOO.org		/tmp		xfs		defaults,nodev,nosuid,loop	0 0
# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
#  use almost no memory if not populated with files)
shm			/dev/shm	tmpfs		nodev,nosuid,noexec	0 0

about the support for 32bit exes in my kernel
grep IA32 /usr/src/linux/.config
CONFIG_IA32_EMULATION=y
CONFIG_IA32_AOUT=y



On Thu, Nov 13, 2008 at 11:52 AM, Volker Armin Hemmann
<volker.armin.hemmann@tu-clausthal.de> wrote:
> On Thursday 13 November 2008, Tonko Mulder wrote:
>> Hello list,
>>
>> for some reason I'm unable to execute binary files and script files
>> (e.g. bash/sh/python).
>> If I put the interpreter in front of the shell script then I'm able to
>> execute the file, but I'm unable to run it as one would normal run it.
>>
>> tonko@Gaius ~/ib2007/bin $ file ib2007ux
>> ib2007ux: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
>> dynamically linked (uses shared libs), for GNU/Linux 2.0.0, stripped
>> tonko@Gaius ~/ib2007/bin $ ./ib2007ux
>> -bash: ./ib2007ux: Access denied
>>
> do you have support for 32bit exes in your kernel?
>
>



-- 
Tonko



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-amd64] Unable to execute binary files on CLI
  2008-11-13 11:18   ` Tonko Mulder
@ 2008-11-13 11:22     ` Tonko Mulder
  2008-11-14  0:33       ` [gentoo-amd64] " Duncan
  0 siblings, 1 reply; 9+ messages in thread
From: Tonko Mulder @ 2008-11-13 11:22 UTC (permalink / raw
  To: gentoo-amd64

I think I just found my own answer...
My fstab option for my extra swap file had an option noexec in it,
just removed it and rebooted and it works now :)

On Thu, Nov 13, 2008 at 12:18 PM, Tonko Mulder <tonko.mulder@gmail.com> wrote:
> First my fstab:
> /dev/sda4               /               xfs             noatime 0 1
> /dev/data/home          /home           xfs             defaults        0 2
> /dev/sda3               none            swap            sw              0 0
> /home/swap.img          none            swap            sw              0 0
> /home/OOO.org           /tmp            xfs             defaults,nodev,nosuid,loop      0 0
> # glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
> # POSIX shared memory (shm_open, shm_unlink).
> # (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
> #  use almost no memory if not populated with files)
> shm                     /dev/shm        tmpfs           nodev,nosuid,noexec     0 0
>
> about the support for 32bit exes in my kernel
> grep IA32 /usr/src/linux/.config
> CONFIG_IA32_EMULATION=y
> CONFIG_IA32_AOUT=y
>
>
>
> On Thu, Nov 13, 2008 at 11:52 AM, Volker Armin Hemmann
> <volker.armin.hemmann@tu-clausthal.de> wrote:
>> On Thursday 13 November 2008, Tonko Mulder wrote:
>>> Hello list,
>>>
>>> for some reason I'm unable to execute binary files and script files
>>> (e.g. bash/sh/python).
>>> If I put the interpreter in front of the shell script then I'm able to
>>> execute the file, but I'm unable to run it as one would normal run it.
>>>
>>> tonko@Gaius ~/ib2007/bin $ file ib2007ux
>>> ib2007ux: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
>>> dynamically linked (uses shared libs), for GNU/Linux 2.0.0, stripped
>>> tonko@Gaius ~/ib2007/bin $ ./ib2007ux
>>> -bash: ./ib2007ux: Access denied
>>>
>> do you have support for 32bit exes in your kernel?
>>
>>
>
>
>
> --
> Tonko
>



-- 
Tonko



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [gentoo-amd64]  Re: Unable to execute binary files on CLI
  2008-11-13 11:22     ` Tonko Mulder
@ 2008-11-14  0:33       ` Duncan
  2008-11-14  6:49         ` Tonko Mulder
  0 siblings, 1 reply; 9+ messages in thread
From: Duncan @ 2008-11-14  0:33 UTC (permalink / raw
  To: gentoo-amd64

"Tonko Mulder" <tonko.mulder@gmail.com> posted
43ba12950811130322s6dc03f46x5d191c7403f9f86f@mail.gmail.com, excerpted
below, on  Thu, 13 Nov 2008 12:22:30 +0100:

> I think I just found my own answer... My fstab option for my extra swap
> file had an option noexec in it, just removed it and rebooted and it
> works now :)

Thanks!  I've never used a swap file, so never would have guessed /that/ 
had anything to do with it, but I did get you on the right track looking 
for noexec.  Yet another weird item to file away on my troubleshooting 
list for next time.  Multiple minds really /are/ better than one! =:^)

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-amd64]  Re: Unable to execute binary files on CLI
  2008-11-14  0:33       ` [gentoo-amd64] " Duncan
@ 2008-11-14  6:49         ` Tonko Mulder
  0 siblings, 0 replies; 9+ messages in thread
From: Tonko Mulder @ 2008-11-14  6:49 UTC (permalink / raw
  To: gentoo-amd64

Op vrijdag 14-11-2008 om 00:33 uur [tijdzone +0000], schreef Duncan:
> "Tonko Mulder" <tonko.mulder@gmail.com> posted
> 43ba12950811130322s6dc03f46x5d191c7403f9f86f@mail.gmail.com, excerpted
> below, on  Thu, 13 Nov 2008 12:22:30 +0100:
> 
> > I think I just found my own answer... My fstab option for my extra swap
> > file had an option noexec in it, just removed it and rebooted and it
> > works now :)
> 
> Thanks!  I've never used a swap file, so never would have guessed /that/ 
> had anything to do with it, but I did get you on the right track looking 
> for noexec.  Yet another weird item to file away on my troubleshooting 
> list for next time.  Multiple minds really /are/ better than one! =:^)
Actually I should be the one thanking you for giving me that hint ;)
And yes "given enough eyballs, all bugs are shallow"

So thanks again.




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-11-14  6:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-13  8:30 [gentoo-amd64] Unable to execute binary files on CLI Tonko Mulder
2008-11-13  9:27 ` Nadav Horesh
2008-11-13 10:04   ` Tonko Mulder
2008-11-13 10:20 ` [gentoo-amd64] " Duncan
2008-11-13 10:52 ` [gentoo-amd64] " Volker Armin Hemmann
2008-11-13 11:18   ` Tonko Mulder
2008-11-13 11:22     ` Tonko Mulder
2008-11-14  0:33       ` [gentoo-amd64] " Duncan
2008-11-14  6:49         ` Tonko Mulder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox