You are not logged in.

#1 2010-05-23 22:51:36

veen
Member
Registered: 2010-05-23
Posts: 2

[solved]cannot execute binary files

For example, what I'm trying to do:

[summerset@arch tmp0]$ ls
test.cpp
[summerset@arch tmp0]$ cat ./test.cpp
#include <fstream>

int main() {
printf("here am I");
}
[summerset@arch tmp0]$ g++ ./test.cpp
[summerset@arch tmp0]$ ./a.out
bash: ./a.out: Permission denied
[summerset@arch tmp0]$ chmod +x ./a.out
[summerset@arch tmp0]$ ./a.out
bash: ./a.out: Permission denied
[summerset@arch tmp0]$ file ./a.out
./a.out: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped
[summerset@arch tmp0]$ ldd ./a.out
ldd: warning: you do not have execution permission for `./a.out'
        not a dynamic executable
[summerset@arch tmp0]$ uname -a
Linux arch 2.6.34-bfs #1 SMP PREEMPT Fri May 21 08:18:49 ALMT 2010 i686 AMD Athlon(tm) 64 X2 Dual-Core Processor TK-55 AuthenticAMD GNU/Linux
[summerset@arch tmp0]$

The same thing when I try to run it from root. Any suggestions?

Last edited by veen (2010-05-23 23:44:17)

Offline

#2 2010-05-23 23:07:56

unplugged23
Member
Registered: 2010-05-02
Posts: 49

Re: [solved]cannot execute binary files

Most desktop enviornments and window managers should allow you to right click on the file, hit properties, and check a little box titled something like 'is executable'


Don't worry, the worst is yet to come. smile

Offline

#3 2010-05-23 23:12:20

veen
Member
Registered: 2010-05-23
Posts: 2

Re: [solved]cannot execute binary files

unplugged23 wrote:

Most desktop enviornments and window managers should allow you to right click on the file, hit properties, and check a little box titled something like 'is executable'

A have already did that:

chmod +x ./a.out

Really, it's strange. Have anyone had similar problem?
upd: the problem actually was in mount options for my home partition.

Last edited by veen (2010-05-23 23:45:35)

Offline

#4 2010-05-24 02:24:45

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: [solved]cannot execute binary files

would you like to enlighten anyone coming across the same problem?
ie past and current mount options

Offline

#5 2010-05-24 02:29:30

kazuo
Member
From: São Paulo/Brazil
Registered: 2008-03-18
Posts: 413
Website

Re: [solved]cannot execute binary files

man mount wrote:

noexec Do not allow direct execution of any binaries on the mounted filesystem.  (Until recently it was  possible  to  run  binaries  anyway  using  a  command  like  /lib/ld*.so /mnt/binary. This trick fails since Linux 2.4.25 / 2.6.0.)

Last edited by kazuo (2010-05-24 02:29:55)

Offline

Board footer

Powered by FluxBB