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

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



On Tue, May 23, 2006 at 02:11:33PM -0400, hendrik@topoi.pooq.com wrote:
> A program I wrote and has run many many times before suddenly stopped
> running, giving "permission denied" errors.


I have found the problem.  I feel really stupid, but maybe someone
will make the same mistake and find this in the archives.

I had changed the mount options for the volume containing the source and 
object code to 'user,defaults'. For some reason that turned off execute
permission on the entire volume, without notifying ls of the fact.  So 
ls showed the binary as executable; whereas in fact it was not.

Adding the 'exec' mount option fixed the problem.

-- hendrik


> 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
> 
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> 



Reply to: