[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Help! I can't even execute my own executables any more!



On Wed, May 24, 2006 at 08:54:18AM -0800, Joshua J. Kugler wrote:
> On Tuesday 23 May 2006 10:11, hendrik@topoi.pooq.com wrote:
> > A program I wrote and has run many many times before suddenly stopped
> > running, giving "permission denied" errors.  Thinking this ight have to
> > to with the recent C++ library changes, I recompiled it.  But this did
> > not help.  I decided to strace, and get a clue what it might be trying
> > to do:
> >
> > hendrik@lovesong:~/dv/txt$ ls -l i686/
> > total 184
> > -rwxr-xr-x 1 hendrik hendrik  46941 2006-05-08 11:41 mtxt2ps
> > -rwxr-xr-x 1 hendrik hendrik 104526 2006-04-25 06:35 parseabw
> > -rwxr-xr-x 1 hendrik hendrik  31945 2006-05-23 08:57 txt
> > hendrik@lovesong:~/dv/txt$ man strace
> > Reformatting strace(1), please wait...
> > hendrik@lovesong:~/dv/txt$  strace i686/txt
> > execve("i686/txt", ["i686/txt"], [/* 26 vars */]) = -1 EACCES (Permission
> > denied) dup(2)                                  = 3
> > fcntl64(3, F_GETFL)                     = 0x2 (flags O_RDWR)
> > fstat64(3, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
> > mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
> > 0xb7f4f000 _llseek(3, 0, 0xbfa63138, SEEK_CUR)     = -1 ESPIPE (Illegal
> > seek) write(3, "strace: exec: Permission denied\n", 32strace: exec:
> > Permission denied ) = 32
> > close(3)                                = 0
> > munmap(0xb7f4f000, 4096)                = 0
> > exit_group(1)                           = ?
> > Process 8317 detached
> > hendrik@lovesong:~/dv/txt$
> >
> > It looks as if execve is failing to read the executable.  But there were
> > no compilation errors, and permissions seem to be set correctly.
> >
> > Does this indicate that I, or my computer, has gone mad?
> > Or is there something deep I need to know?
> >
> > It's an ordinary 32-bit PC, running etch.
> >
> > -- hendrik
> 
> 
> What does the output of 'mount' look like?  I've run into this error before 
> when the partition on which the binary resided was mounted 'noexec'.  It can 
> be maddening until you figure it out! :)
> 

It was!

What clued me in was when, at my son's advice, I copied /bin/sh to my 
local directory and the copy failed to run, although the original did.

-- hendrik



Reply to: