- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- lsof problem --> /sbin/sh: lsof: Execute permissio...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2002 10:33 AM
09-17-2002 10:33 AM
Getting the following error:
/sbin/sh: lsof: Execute permission denied.
Here's my directory and file permissions:
# ll /usr/local/bin/lsof
-rwxr-sr-x 1 bin sys 252940 Jul 3 12:40 /usr/local/bin/lsof
# ll -d /usr/local/bin
drwxr-xr-x 6 bin bin 5120 Sep 17 14:32 /usr/local/bin
# ll -d /usr/local
drwxrwxrwx 16 bin bin 1024 Sep 17 13:42 /usr/local
# id root
uid=0(root) gid=3(sys) groups=0(root),1(other),2(bin),4(adm),5(daemon),6(mail),7(lp),20(users),104(ctxuser),600(mqm),202(ARCserve),222(crituser),500(dba),700(ctxadm),701(citrix),777(powerview),105(iplant)
#
# which lsof
/usr/local/bin/lsof
#
Any ideas?
Jack...
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2002 10:38 AM
09-17-2002 10:38 AM
Re: lsof problem --> /sbin/sh: lsof: Execute permission denied.
# ./lsof /etc/services
or
# /usr/local/bin/lsof /etc/services
Cheryl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2002 10:40 AM
09-17-2002 10:40 AM
Re: lsof problem --> /sbin/sh: lsof: Execute permission denied.
jack...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2002 10:43 AM
09-17-2002 10:43 AM
Re: lsof problem --> /sbin/sh: lsof: Execute permission denied.
It should run as root regardless of the setting of the setuid and setgid bits.
Secondly my lsof executable is quite a bit smaller than yours (~156k) but I compiled from source so that may be fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2002 10:47 AM
09-17-2002 10:47 AM
Re: lsof problem --> /sbin/sh: lsof: Execute permission denied.
Where did you get the lsof from? I found another report of this error and it was a problem with how the 64 bit files were compiled. Downloading a clean copy fixed the problem.
You can download and compile it yourself or find one precompiled:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x07980559ff7cd4118fef0090279cd0f9,00.html Look for attachment
ftp://coast.cs.purdue.edu/pub/tools/unix/sysutils/lsof/
http://ftp.cerias.purdue.edu/pub/tools/unix/sysutils/lsof/binaries/hpux/B.11.11/
Cheryl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2002 10:48 AM
09-17-2002 10:48 AM
Re: lsof problem --> /sbin/sh: lsof: Execute permission denied.
jack...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2002 10:52 AM
09-17-2002 10:52 AM
Re: lsof problem --> /sbin/sh: lsof: Execute permission denied.
Do you have any security software on your system that blocking you use of this.?
Try removing SGID bit, with plain 755 permission on lsof file.
Thanks.
Prashant.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2002 11:02 AM
09-17-2002 11:02 AM
Re: lsof problem --> /sbin/sh: lsof: Execute permission denied.
lsof_4.64: WARNING: compiled for HP-UX release B.11.11; this is B.11.00.
lsof_4.64: FATAL: pst_status_size should be: 1176; is 920
lsof_4.64: FATAL: pst_vminfo_size should be: 1240; is 1096
lsof_4.64: FATAL: pst_static doesn't contain pst_filedetails_size
lsof_4.64: FATAL: pst_static doesn't contain pst_socket_size
lsof_4.64: FATAL: pst_static doesn't contain pst_stream_size
lsof_4.64: FATAL: pst_static doesn't contain pst_mpathnode_size
lsof_4.64: FATAL: pst_static doesn't contain pst_fileinfo2_size
Oh well. I'll go back and try changing the security to 755.
jack...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2002 11:07 AM
09-17-2002 11:07 AM
Re: lsof problem --> /sbin/sh: lsof: Execute permission denied.
Don't know if this is useful.
file lsof returns the following:
lsof: ELF-32 executable object file
--------------
Here's the ll listing again...
-rwxr-xr-x 1 bin sys 252940 Jul 3 12:40 /usr/local/bin/lsof
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2002 11:11 AM
09-17-2002 11:11 AM
Re: lsof problem --> /sbin/sh: lsof: Execute permission denied.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2002 11:14 AM
09-17-2002 11:14 AM
Re: lsof problem --> /sbin/sh: lsof: Execute permission denied.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2002 11:17 AM
09-17-2002 11:17 AM
Re: lsof problem --> /sbin/sh: lsof: Execute permission denied.
getconf KERNEL_BITS returns 64.
I pullled the lsof_4.64.gz version.
jack...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2002 11:31 AM
09-17-2002 11:31 AM
Re: lsof problem --> /sbin/sh: lsof: Execute permission denied.
Here's what I got with the ./Configur hpuxgcc option:
[10064]root@chldevh:/tmp/lsof-4.64 # ./Configure hpuxgcc
Configuring /dev/kmem-based HP-UX lsof
*****************************************
* *
* NOTICE! Configuring for 64 bit HP-UX *
* *
*****************************************
Testing /usr/local/bin/gcc for 64 bit support
***************************************************
* *
* !!!!!!!!!!!!!!!!! FATAL ERROR !!!!!!!!!!!!!!!!! *
* *
* APPARENTLY GCC CANNOT BUILD 64 BIT EXECUTABLES. *
* A COMPILER MUST BE USED THAT CAN. SEE 00FAQ *
* FOR MORE INFORMATION. *
* *
***************************************************
----------------------------------------------------------
Here's what I get with a normal compile, system doesn't have HP compiler:
[10065]root@chldevh:/tmp/lsof-4.64 # ./Configure hpux
Configuring /dev/kmem-based HP-UX lsof
*****************************************
* *
* NOTICE! Configuring for 64 bit HP-UX *
* *
*****************************************
Looking in /stand/vmunix for ipis_s with /usr/contrib/bin/q4 ...
!!!ERROR!!! /usr/contrib/bin/q4 failed and produced the following output.
q4: (warning) no modules in the crashdump or no INDEX file
q4: (error) vmunix not pxdb'd
!!!ERROR!!! !!!ERROR!!! !!!ERROR!!! !!!ERROR!!!
Configure can't use /usr/contrib/bin/q4 to examine the ipis_s
structure. You must do that yourself, report the result in
the HPUX_IPC_S_PATCH environment variable, then repeat the
Configure step. Consult the Configure script's use of
/usr/contrib/bin/q4 and the 00XCONFIG file for information
on ipis_s testing and the setting of HPUX_IPC_S_PATCH.
!!!ERROR!!! !!!ERROR!!! !!!ERROR!!! !!!ERROR!!!
----------------------------------------------------------
I guess I need to find a 64-bit gcc compiler?
jack...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2002 04:17 PM
09-17-2002 04:17 PM
SolutionI have the same error before when I compile the lsof in 11i and used it by other user.
At last, I set the set-user-ID bit and all is OK, i.e. chmod u+s lsof
-rwsr-xr-x 1 root sys 159744 Mar 6 2002 /usr/local/bin/lsof
Regards,
Patrick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2002 05:05 AM
09-18-2002 05:05 AM
Re: lsof problem --> /sbin/sh: lsof: Execute permission denied.
111111 00000 0000
111111 00000 0000
111111 00000 0000
111111 00000 0000
111111 00000 0000
111111 00000 0000
111111 00000 0000
111111 00000 0000
111111 00000 0000
111111 00000 0000
111111 00000 0000
111111 00000 0000
111111 00000 0000
111111 000000000000000000
A big 10. Thanks Patrick. I was ready to give up.
jack...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2002 05:29 AM
09-18-2002 05:29 AM
Re: lsof problem --> /sbin/sh: lsof: Execute permission denied.
chmod 4555 lsof
Security will be set to -r-sr-xr-x
jack...