1 |
"Tonko Mulder" <tonko.mulder@×××××.com> posted |
2 |
43ba12950811130030h6405b74aia30fff4b38424383@××××××××××.com, excerpted |
3 |
below, on Thu, 13 Nov 2008 09:30:09 +0100: |
4 |
|
5 |
> for some reason I'm unable to execute binary files and script files |
6 |
> (e.g. bash/sh/python). |
7 |
> If I put the interpreter in front of the shell script then I'm able to |
8 |
> execute the file, but I'm unable to run it as one would normal run it. |
9 |
|
10 |
Three possibilities (in addition to what Nadav already mentioned, user |
11 |
exec permissions and a missing or corrupted /usr/bin/env): |
12 |
|
13 |
1: Mount options. At one point some years ago (back on Mandrake) I had / |
14 |
tmp mounted noexec, forgot about it, and then had something (I actually |
15 |
wanted) try to run from there. I was rather new to Linux at the time, |
16 |
and checked permissions and all sorts of stuff I thought /might/ be the |
17 |
problem, before I figured it out. "Doh!" <said while smacking my |
18 |
forehead> "Of /course/ it can't execute, /tmp's mounted noexec! |
19 |
|
20 |
So I don't know your file system volume layout, but if it's happening on |
21 |
only one mounted volume, that could be your problem. |
22 |
|
23 |
2: Kernel executable type options: |
24 |
|
25 |
In menuconfig, under Executable file formats / Emulations, verify that |
26 |
IE32 Emulation is turned on (IA32_EMULATION=y in your .config, I noted |
27 |
that the file report you posted said ELF 32-bit, and this is of course an |
28 |
amd64 list so I'm assuming a 64-bit kernel and main system, you'll need |
29 |
that 32-bit kernel option enabled to run 32-bit code). |
30 |
|
31 |
For certain types of executables you may need Kernel support for MISC |
32 |
binaries (BINFMT_MISC), located in the same submenu, turned on (and its |
33 |
pseudofs mounted) as well. I don't have it turned on here and haven't |
34 |
run into problems, but read the associated help anyway, and if necessary, |
35 |
the other documentation it mentions. |
36 |
|
37 |
3. If it's 32-bit you're looking at, perhaps your multilib config is |
38 |
messed up. But since I don't do servitudeware (see the sig) and all the |
39 |
freedomware I run has been ported to amd64 for quite some time, I have no |
40 |
reason for multilib and thus run the 64-bit-only no-multilib profile, so |
41 |
I'll be of little help in that regard. |
42 |
|
43 |
-- |
44 |
Duncan - List replies preferred. No HTML msgs. |
45 |
"Every nonfree program has a lord, a master -- |
46 |
and if you use the program, he is your master." Richard Stallman |