Operating System - HP-UX
1834566 Members
3611 Online
110069 Solutions
New Discussion

sh: swlist: Execute permission denied

 
SOLVED
Go to solution
ASOEASTGEOGRAPHY
Occasional Advisor

sh: swlist: Execute permission denied

After installing patches I cannot execute no SD
command. I get the follwing message:

sh: swlist: Execute permission denied
Kristina(:)
9 REPLIES 9
Jeff Machols
Esteemed Contributor

Re: sh: swlist: Execute permission denied

are you sure you are root (run the id command to make sure). also, do an ls -l /usr/sbin/swlist and make sure its has execute permissions
John Palmer
Honored Contributor

Re: sh: swlist: Execute permission denied

First thing, check the permissions of /usr/sbin/swlist, should be:
-r-sr-xr-x 11 root bin

Regards,
John
Helen French
Honored Contributor

Re: sh: swlist: Execute permission denied

Hi,

Can you try:

# swconfig \*

Did you try running 'swverify' command ?

HTH,
Shiju
Life is a promise, fulfill it!
ASOEASTGEOGRAPHY
Occasional Advisor

Re: sh: swlist: Execute permission denied

Yes, I am root. I found the swlist and others
with the following permissions:

r-sr-xr-x

I changed to

r-xr-xr-x and still get the same problem.
Kristina(:)
Mark Greene_1
Honored Contributor

Re: sh: swlist: Execute permission denied

run the file command on swlist:

file /usr/sbin/swlist
/usr/sbin/swlist: PA-RISC1.1 shared executable dynamically linked


to make sure that the command did not get overlayed with something else

HTH
mark
the future will be a lot like now, only later
Uday_S_Ankolekar
Honored Contributor

Re: sh: swlist: Execute permission denied

Hi,

Try running
swconfig \*

-USA..
Good Luck..
John Palmer
Honored Contributor
Solution

Re: sh: swlist: Execute permission denied

Hi again,

It sounds as though the binary has been corrupted. What does ll /usr/sbin/swacl, file /usr/sbin/sacl and what /usr/sbin/swacl display?

Bear in mind that in 11.00, there are 11 commands all hard linked to the same binary - all except swmodify and swpackage.

If you are on 11.00 then you may well have the previous version saved in /var/adm/sw/save. Try the following...

cd /var/adm/sw/save
find . -name swacl

Should identify one (or more) previous versions. You could copy the latest of these back to /usr/sbin to enable you to sort out your patches. Run 'what' on each to identify them.

I'd also put the correct permissions back:
chmod 4555 /usr/sbin/swacl

Regards,
John
ASOEASTGEOGRAPHY
Occasional Advisor

Re: sh: swlist: Execute permission denied

All permissions are back to normal and
file /usr/sbin/swlist says:

PARISC1.1 shared exedcutable dynamically linked
Kristina(:)
Jeff Machols
Esteemed Contributor

Re: sh: swlist: Execute permission denied

try running

#which swlist

to make sure you are actually looking at /usr/sbin/swlist