Operating System - HP-UX
1753549 Members
5581 Online
108795 Solutions
New Discussion юеВ

Re: sh: find: Execute permission denied.

 
SOLVED
Go to solution
JUAN VIDAL_1
Advisor

sh: find: Execute permission denied.

PLATFORM DESCRIPTION:
---------------------
HP-UX B.11.11 U 9000/800 RP3410

PROBLEM DESCRIPTION:
--------------------
as root:

# find hosts
sh: find: Execute permission denied.

# /usr/bin/find
-rwxr-xr-x 1 bin bin 103836 Jul 16 17:42 /usr/bin/find

15 REPLIES 15
Patrick Wallek
Honored Contributor
Solution

Re: sh: find: Execute permission denied.

>># find hosts

Do a 'whence -v find' to make sure the 'find' command that should be running is the one that is actually running.
JUAN VIDAL_1
Advisor

Re: sh: find: Execute permission denied.

Hi Patrick,

# whence -v find
find is /usr/bin/find
Mel Burslan
Honored Contributor

Re: sh: find: Execute permission denied.

did you try calling the find using the absolute path name ? as in:

/usr/bin/find ./ -name hosts

________________________________
UNIX because I majored in cryptology...
JUAN VIDAL_1
Advisor

Re: sh: find: Execute permission denied.

Hi Mel,

# /usr/bin/find ./ -name hosts
sh: /usr/bin/find: Execute permission denied.
Mel Burslan
Honored Contributor

Re: sh: find: Execute permission denied.

what does these command say ? please port the outputs:

what /usr/bin/find
file /usr/bin/find
________________________________
UNIX because I majored in cryptology...
Patrick Wallek
Honored Contributor

Re: sh: find: Execute permission denied.

The size of your 'find' executable does not seem correct. Here it is from one of my 11.11 servers:

HP-UX 11.11:
# ll /usr/bin/find
-r-xr-xr-x 1 bin bin 61440 Jul 30 2007 /usr/bin/find*

Also do a 'file /usr/bin/find'. The result should be:

$ file /usr/bin/find
/usr/bin/find: PA-RISC1.1 shared executable dynamically linked

If it is not, then your find executable is messed up.
JUAN VIDAL_1
Advisor

Re: sh: find: Execute permission denied.

Mel:
# what /usr/bin/find
/usr/bin/find:
nr81pl2,sys,root # file /usr/bin/find
/usr/bin/find: ELF-32 executable object file
nr81pl2,sys,root #
JUAN VIDAL_1
Advisor

Re: sh: find: Execute permission denied.

Patrick:

# file /usr/bin/find
/usr/bin/find: ELF-32 executable object file

Why/how it messed up?

replacing it by the correct one will fix?
Patrick Wallek
Honored Contributor

Re: sh: find: Execute permission denied.

Also note the date on your '/usr/bin/find' of Jul 16 17:42. Something was done to it on July 16 at 17:42 (5:42 PM).

To see if it truly is 'find' do:

$ what /usr/bin/find
/usr/bin/find:
find.c $Date: 2005/12/21 22:37:15 $Revision: r11.11/7 PATCH_11.11 (PHCO_34241)
funcs.c $Date: 2002/02/09 04:05:22 $Revision: r11.11/2 PATCH_11.11 (PHCO_25905)
aclv_patt.c $Date: 2004/11/22 10:47:21 $Revision: r11.11/1 PATCH_11.11 (PHCO_30746)
libcpio.c $Date: 2007/06/27 12:29:49 $Revision: r11.11/2 PATCH_11.11 (PHCO_36502)
getpwd.c $Date: 2004/11/22 10:47:21 $Revision: r11.11/3 PATCH_11.11 (PHCO_30746)
$Revision: @(#) find R11.11_BL2007_0730_1 PATCH_11.11 PHCO_36502

If you don't get output similar to the above, then your find is not really find.