• «
  • 1
  • 2
  • »
  • Pages: 1/2     Go
主题 : -/bin/sh: ./: Permission denied问题 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 17969
精华: 0
发帖: 15
金钱: 75 两
威望: 15 点
贡献值: 0 点
综合积分: 30 分
注册时间: 2010-04-03
最后登录: 2010-05-22
楼主  发表于: 2010-05-12 10:35

 -/bin/sh: ./: Permission denied问题

复制代码
  1. [root@FriendlyARM /]# cd /usr/local/sbin/mde-1.6.10/bomb
  2. [root@FriendlyARM bomb]# ./ bomb
  3. -/bin/sh: ./: Permission denied
  4. [root@FriendlyARM bomb]# ls -l bomb
  5. -rwxrwxrwx    1 root     root        69780 May 11  2010 bomb


bomb 是MiniGUI的程序,已经对bomb用过chmod 777命令了,可是还是出现上述的错误,请问是怎么回事……?
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2010-05-12 12:48
不是./<空格>bomb, 而是./bomb, 表示执行当前目录下的bomb文件。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 17969
精华: 0
发帖: 15
金钱: 75 两
威望: 15 点
贡献值: 0 点
综合积分: 30 分
注册时间: 2010-04-03
最后登录: 2010-05-22
2楼  发表于: 2010-05-12 15:07
复制代码
  1. [root@FriendlyARM bomb]# ./bomb
  2. -/bin/sh: ./bomb: not found

好像应该是在中间加空格的吧?要不然就是上面这样了
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
3楼  发表于: 2010-05-12 15:16

 回 2楼(mondayblue) 的帖子

呵呵,那你就加吧。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 17969
精华: 0
发帖: 15
金钱: 75 两
威望: 15 点
贡献值: 0 点
综合积分: 30 分
注册时间: 2010-04-03
最后登录: 2010-05-22
4楼  发表于: 2010-05-12 15:45
哦…我现在不加空格,在当前目录运行bomb,但是为什么它会提示说not found?
这个目录下是有bomb这个可执行文件的
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
5楼  发表于: 2010-05-12 15:58

 回 4楼(mondayblue) 的帖子

为什么你不在发帖之前先看看别人的帖子呢?
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 17969
精华: 0
发帖: 15
金钱: 75 两
威望: 15 点
贡献值: 0 点
综合积分: 30 分
注册时间: 2010-04-03
最后登录: 2010-05-22
6楼  发表于: 2010-05-12 16:09
之前一直纠缠于Permission denied的问题,麻烦版主了
我再查查not found的解决办法吧,可能是缺少库文件的原因,要是解决了我会把方法回复上来的
级别: 新手上路
UID: 17969
精华: 0
发帖: 15
金钱: 75 两
威望: 15 点
贡献值: 0 点
综合积分: 30 分
注册时间: 2010-04-03
最后登录: 2010-05-22
7楼  发表于: 2010-05-13 15:33
not found 的问题已经解决
用arm-linux-readelf -l bomb命令
复制代码
  1. Elf file type is EXEC (Executable file)
  2. Entry point 0x920c
  3. There are 6 program headers, starting at offset 52
  4. Program Headers:
  5.   Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  6.   PHDR           0x000034 0x00008034 0x00008034 0x000c0 0x000c0 R E 0x4
  7.   INTERP         0x0000f4 0x000080f4 0x000080f4 0x00013 0x00013 R   0x1
  8.       [Requesting program interpreter: /lib/ld-linux.so.2]
  9.   LOAD           0x000000 0x00008000 0x00008000 0x04901 0x04901 R E 0x8000
  10.   LOAD           0x005000 0x00015000 0x00015000 0x00228 0x05bb0 RW  0x8000
  11.   DYNAMIC        0x005024 0x00015024 0x00015024 0x000f0 0x000f0 RW  0x4
  12.   NOTE           0x000108 0x00008108 0x00008108 0x00020 0x00020 R   0x4
  13. Section to Segment mapping:
  14.   Segment Sections...
  15.    00    
  16.    01     .interp
  17.    02     .interp .note.ABI-tag .hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata
  18.    03     .data .eh_frame .dynamic .ctors .dtors .jcr .got .bss
  19.    04     .dynamic
  20.    05     .note.ABI-tag

从交叉编译器里找到ld-linux.so.2及相关文件拷贝到开发板的/lib目录下后就解决了,但是还是有缺少库和其他问题……
级别: 侠客
UID: 13889
精华: 0
发帖: 53
金钱: 270 两
威望: 54 点
贡献值: 0 点
综合积分: 106 分
注册时间: 2010-01-30
最后登录: 2012-04-07
8楼  发表于: 2011-12-26 12:55

 回 5楼(kasim) 的帖子

请问哪个帖子呢,同样遇到这样的问题
级别: 侠客
UID: 13889
精华: 0
发帖: 53
金钱: 270 两
威望: 54 点
贡献值: 0 点
综合积分: 106 分
注册时间: 2010-01-30
最后登录: 2012-04-07
9楼  发表于: 2011-12-26 12:56
关于ANDROID驱动的应用测试程序
先是Permission denied权限问题,修改后又说找不到文件,可明明就有这个文件
  • «
  • 1
  • 2
  • »
  • Pages: 1/2     Go