Operating System - HP-UX
1850382 Members
2652 Online
104054 Solutions
New Discussion

Re: lsof - excution permission denied

 
Ed Kwan_2
Advisor

lsof - excution permission denied

I just installed the lsof 64 bit version for 11.20. When I try to execute it, I get a "execution permission denied", I changed the mode to 4777 but didnt help.

What mod should I set it to ?

Thanks, Ed
13 REPLIES 13
Pete Randall
Outstanding Contributor

Re: lsof - excution permission denied

Ed,

Mine looks like this:

root# ll /opt/lsof/bin/lsof
-r-xr-sr-x 1 root sys 192600 Jun 18 10:23 /opt/lsof/bin/lsof


Pete

Pete
harry d brown jr
Honored Contributor

Re: lsof - excution permission denied


Well, I was able to change my lsof, on 11.11 (11i) to this and su'ed to a non-root user and it worked:

# chmod 4555 /usr/local/bin/lsof
# ls -l /usr/local/bin/lsof
-r-sr-xr-x 1 root sys 126976 Nov 7 2001 /usr/local/bin/lsof

4777 isn't a good idea.

Do a lsof -v like this:
# /usr/local/bin/lsof -v
lsof version information:
revision: 4.57
latest revision: ftp://vic.cc.purdue.edu/pub/tools/unix/lsof/
latest FAQ: ftp://vic.cc.purdue.edu/pub/tools/unix/lsof/FAQ
latest man page: ftp://vic.cc.purdue.edu/pub/tools/unix/lsof/lsof_man
configuration info: PSTAT-based
constructed: Tue Jul 17 08:28:49 PDT 2001
constructed by and on: abe@hpux
compiler: /bin/cc
compiler flags: -DHPUXV=1111 -D_PSTAT64 -Ae +DD32 -DLSOF_VSTR="B.11.11" -O
loader flags: -L./lib -llsof -lnsl
system info: HP-UX hpux B.11.11 U 9000/893 807805111 unlimited-user license
#


live free or die
harry
Live Free or Die
Ed Kwan_2
Advisor

Re: lsof - excution permission denied

Hi Pete,
Thanks for the reply, I set it to exactly like you said but still get the same error message.
Ed
Ed Kwan_2
Advisor

Re: lsof - excution permission denied

I must not be getting the right version of lsof. The installation only puts a copy to /usr/local/bin not the usual /opt/lsof/bin/lsof, seems like I am missing some pieces.

Thanks, Ed
Pete Randall
Outstanding Contributor

Re: lsof - excution permission denied

Ed,

I just noticed that you said 11.20. Did you get a pre-compiled version or build it yourself? If pre-compiled, are you sure it was for 11.20?

Pete

Pete
harry d brown jr
Honored Contributor

Re: lsof - excution permission denied

Ed,

Try this to find what lsof versions you have:

which lsof

or

find / -type f -name lsof -print -exec {} -v \;

live free or die
harry
Live Free or Die
Ed Kwan_2
Advisor

Re: lsof - excution permission denied

I downloaded the depot from http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.64.

It has a version for 11.00 with is 32 bit only. I need a version for 11.11 so I tried the 11.20 depot.
Pete Randall
Outstanding Contributor

Re: lsof - excution permission denied

11.20 is IPF, I believe. I can see where that might not work. Harry will be along in a minute with the site for pre-compliled 11.11 (I can't remember it off the top of my head).

Pete

Pete
Ed Kwan_2
Advisor

Re: lsof - excution permission denied

Pete, you are right, I forgotten about it.

Please point me to the right site to download.

Thanks, Ed
Pete Randall
Outstanding Contributor

Re: lsof - excution permission denied

This is what Harry would have told you:

ftp://vic.cc.purdue.edu/pub/tools/unix/lsof/

Pete

Pete
Ed Kwan_2
Advisor

Re: lsof - excution permission denied

Thank you all for all the help.

I got a copy from this site to try, the Purdue site is a little slow.

http://ftp.u-strasbg.fr/securite/lsof/binaries/hpux/B.11.11/
Steven E. Protter
Exalted Contributor

Re: lsof - excution permission denied

The 11.00 version is a better starting point.

I have it working, but didn't have to mess with it after the fact. Haven't migrated it to 11.11 yet.


Interestingly enough, some of my 11.00 depots like snarf installed and migrated just fine.

Some didn't work right.
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ed Kwan_2
Advisor

Re: lsof - excution permission denied

Steven, thanks for the info. The one I obtained works fine.