1

When building klee, I need build uclibc for klee first. But something went wrong when I tried to make uclibc, the error info are:

qingjinlyc@qingjinlyc:~/IDEs/klee-uclibc-0.02-i386$ make
/bin/sh: 1: /home/qingjinlyc/IDEs/llvm-gcc-4.2-2.9-i686-linux: Permission denied
make: execvp: /home/qingjinlyc/IDEs/llvm-gcc-4.2-2.9-i686-linux: Permission denied
make: execvp: /home/qingjinlyc/IDEs/llvm-gcc-4.2-2.9-i686-linux: Permission denied
/bin/sh: 1: /home/qingjinlyc/IDEs/llvm-gcc-4.2-2.9-i686-linux: Permission denied
make[1]: execvp: /home/qingjinlyc/IDEs/llvm-gcc-4.2-2.9-i686-linux: Permission denied
make[1]: execvp: /home/qingjinlyc/IDEs/llvm-gcc-4.2-2.9-i686-linux: Permission denied
extra/scripts/gen_bits_syscall_h.sh: 30: extra/scripts/gen_bits_syscall_h.sh:             /home/qingjinlyc/IDEs/llvm-gcc-4.2-2.9-i686-linux: Permission denied
extra/scripts/gen_bits_syscall_h.sh: 26: extra/scripts/gen_bits_syscall_h.sh:   /home/qingjinlyc/IDEs/llvm-gcc-4.2-2.9-i686-linux: Permission denied
make locale_headers
/bin/sh: 1: /home/qingjinlyc/IDEs/llvm-gcc-4.2-2.9-i686-linux: Permission denied
make[1]: execvp: /home/qingjinlyc/IDEs/llvm-gcc-4.2-2.9-i686-linux: Permission denied
make[1]: execvp: /home/qingjinlyc/IDEs/llvm-gcc-4.2-2.9-i686-linux: Permission denied
make[1]: Nothing to be done for `locale_headers'.
CC libcrypt/crypt.os
/bin/sh: 1: /home/qingjinlyc/IDEs/llvm-gcc-4.2-2.9-i686-linux: Permission denied
make: *** [libcrypt/crypt.os] Error 126

I have checked the pemmissions of the correspoding directory:

drwxrwxrwx  9 qingjinlyc root 4096 Feb 24 08:52 llvm-gcc-4.2-2.9-i686-linux

it seems that all users in all group have access right to this directory, so it is quite strange how this make error happened...

I have been trapped in this problem for a whole day, anyone who can help will be appreciated :)

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
qingjinlyc
  • 175
  • 2
  • 12
  • What are the results of `file /home/qingjinlyc/IDEs/llvm-gcc-4.2-2.9-i686-linux`? Also, if your build of uClibc went awry, perhaps you should just blow away that directory, decompress the tarball and try again. – johnsyweb Feb 24 '13 at 02:56
  • Setting world write permission for *anything* is almost certainly a bad idea. And if it's under your home directory, and no other users need access to it, then `rwx------` should be sufficient. – Keith Thompson Feb 24 '13 at 03:36
  • It *looks* like something is trying to execute `/home/qingjinlyc/IDEs/llvm-gcc-4.2-2.9-i686-linux` as if it were an executable file rather than a directory -- but with `drwxrwxrwx` permissions, I wouldn't expect `Permission denied` to be the error message. – Keith Thompson Feb 24 '13 at 03:38

1 Answers1

0

In order to execute a given file or directory, a user needs the execute-permissions on its parent directory, and its parent directory's parent directory, and so on. I'm guessing that / and /home/ are fine, so the problem is probably with /home/qingjinlyc/ and/or one of its descendants. To confirm that / and /home/ are fine, you can run this command:

ls -ld / /home/

and to confirm that one of the subdirectories isn't, you can run this command:

ls -ld /home/qingjinlyc/{,IDEs/{,llvm-gcc-4.2-2.9-i686-linux/}}

Then, to fix that, you can run this command:

chmod +x /home/qingjinlyc/{,IDEs/{,llvm-gcc-4.2-2.9-i686-linux/}}

(But you might want to take a moment to consider whether you really want all users of this system to be able to see what's in your home directory. I mean, it's probably fine, but it's worth a moment's consideration to be sure.)

ruakh
  • 175,680
  • 26
  • 273
  • 307
  • If he can do an `ls -l` on the directory, that implies he has sufficient permission on the directory's parents up to `/`. – Keith Thompson Feb 24 '13 at 03:39
  • @KeithThompson: Yes, absolutely; but the question mentions checking that "all users in all group have access right to this directory", so I was assuming that some part of the script runs as a *different* user that then *also* needs access to the directory. Maybe that was a bad assumption? – ruakh Feb 24 '13 at 04:10
  • thank for your prompt reply, but I don`t think what you said is the path to solving the problem. I am sure the parent directories of the target directory are all accessible. I finally solved the problem by adding llvm-gcc to my PATH, although I still don`t know exactlly how this pemmission denied error happened. – qingjinlyc Feb 26 '13 at 11:45