Operating System - HP-UX
1834928 Members
2527 Online
110071 Solutions
New Discussion

Problem with some commands

 
SOLVED
Go to solution
Victor_138
Regular Advisor

Problem with some commands

I'm having problems executing the man and more commands (at least). After issuing the command an Execute permission denied messege appers and the command quits.

Anyone knows what's going on? I'm trying the commands as root.
126 REPLIES 126
Victor BERRIDGE
Honored Contributor

Re: Problem with some commands

Hi,
You are having trouble with "more", try pg...
type which more
Should be something like:
# which more
/usr/bin/more
ant # ll /usr/bin/more
-r-xr-xr-x 2 bin bin 73728 Jul 16 2002 /usr/bin/more


All the best

Victor
Rick Garland
Honored Contributor

Re: Problem with some commands

Check the permissions on the more command - should be executable.

Also what user are you as? Again, more should be executable for all users.

Bill Hassell
Honored Contributor

Re: Problem with some commands

Two other suggestions:

# type more

(this shows where the "more" command is located and configured or aliased) If it does not report: "more is /usr/bin/more" then you're not running the 'normal' more command.

ll -d / /usr /usr/bin

This verifies that someone (root) has not changed critical system directories. / should be 755 and /usr and /usr/bin should be 555. Hopefully, someone has not been reading the Unix Security for Dummys book and trying to 'improve' the system.


Bill Hassell, sysadmin
Victor_138
Regular Advisor

Re: Problem with some commands

I'm logged in as root.

The ll /usr/bin/more returns this:
-r-xr-xr-x 2 bin bin
Bill Hassell
Honored Contributor

Re: Problem with some commands

Try the ll -d command above. It will list 3 directories like this:

l -d / /usr /usr/bin
drwxr-xr-x 25 root root 8192 May 13 14:53 //
dr-xr-xr-x 24 bin bin 8192 Feb 28 08:09 /usr/
dr-xr-xr-x 5 bin bin 16384 Mar 30 09:55 /usr/bin/

Your copy of more is probably OK but until you use the "type" command to determine exactly what happens when you type the command, that file may be irrelevant.


Bill Hassell, sysadmin
Volker Borowski
Honored Contributor

Re: Problem with some commands

Hi,

may be the file is defective or compromized ? Or some setup of your shell environment may be missset

Check

ls -ld /usr/bin

Open an ftp client to your station and browse /usr/bin for a list of files.

Change the shell to a "csh" and check if this changes the error.

Volker
Victor_138
Regular Advisor

Re: Problem with some commands

ll -d / /usr /usr/bin results:

drwxr-xr-x 29 root root 5120 May 17 07:45 /
dr-xr-xr-x 25 bin bin 1024 Apr 29 09:47 /usr
dr-xr-xr-x 6 bin bin 9216 Apr 1 19:09 /usr/bin
Victor_138
Regular Advisor

Re: Problem with some commands

Volker, how can I change shells?
Victor BERRIDGE
Honored Contributor

Re: Problem with some commands

Hi
Since you are root I wonder we are not dealing with an nfs mountpoint...
type bdf and show us the output


All the best
Victor
Victor_138
Regular Advisor

Re: Problem with some commands

BDF results:

Filesystem kbytes used avail %used Mounted on
/dev/root 147456 21989 117673 16% /
/dev/vg00/lvol1 83733 31469 43890 42% /stand
/dev/vg00/lvol9 524288 515899 8102 98% /var
/dev/vg00/lvol8 565248 408143 147307 73% /usr
/dev/vg02/lvol4 8192000 3230686 4651470 41% /u08
/dev/vg02/lvol3 8192000 7924257 251074 97% /u07
/dev/vg01/lvol4 6144000 4099709 1916528 68% /u06
/dev/vg01/lvol3 2048000 73294 1851293 4% /u05
/dev/vg02/lvol2 2048000 104022 1822483 5% /u04
/dev/vg02/lvol1 2048000 187017 1744677 10% /u03
/dev/vg01/lvol2 3072000 54145 2829242 2% /u02
/dev/vg01/lvol1 3072000 636152 2283610 22% /u01
/dev/vg00/lvol7 65536 1424 60158 2% /tmp
/dev/vg00/lvol6 618496 162932 427129 28% /opt
/dev/vg00/lvol5 24576 1109 22008 5% /home
Victor BERRIDGE
Honored Contributor

Re: Problem with some commands

OK no nfs
But / should /dev/vg00/lvol3 and not /dev/root..
You had some trouble at your last reboot

But I have to leave, having some proxy trouble to solve sorry...

All the best
Victor
Victor_138
Regular Advisor

Re: Problem with some commands

What do you mean by "You had some trouble at your last reboot"?

Bharat Katkar
Honored Contributor

Re: Problem with some commands

hi,
i doubt if your shell has been corrupted.
do cksum on e.g. /usr/bin/bash if using bash.
try executing the command usinf different shell.

Hope that helps.
Regards,
You need to know a lot to actually know how little you know
Bill Hassell
Honored Contributor

Re: Problem with some commands

/dev/root indicates that during the last reboot, there were some serious problems with the boot disk and the emergency devicefile /dev/root was used to get the system up and running. You can fix the /dev/root connection by:

rm /etc/mnttab
mount -a
bdf

However, you need to look at the boot information on your disk:

lvlnboot -v
vgdisplay vg00

This will tell you if there are problems. The fixes will depend on what errors you see.


Bill Hassell, sysadmin
Victor BERRIDGE
Honored Contributor

Re: Problem with some commands

Thanks Bill for explaining to our friend...

I noticed also /var is VERY full, and many processes open files /var or /tmp so I would suggest some cleaning up!
This might help (a little) or help eliminating reasons of issues...


All the best
Victor

P.S
Anyone else get the following?

system unavailable
The system is currently unavailable. Please try again later.

wpa-pl-wpaframework-10000
Victor_138
Regular Advisor

Re: Problem with some commands

do cksum on e.g. /usr/bin/bash if using bash.

kcspecdp # cksum /usr/bin/sh
1175894443 495616 /usr/bin/sh

try executing the command using different shell.

kcspecdp # /usr/bin/ksh
kcspecdp # echo $SHELL
/sbin/sh
kcspecdp #

The shell doesn't seems to change.

Victor BERRIDGE
Honored Contributor

Re: Problem with some commands

ant:/export/f $ echo $SHELL
/usr/bin/ksh
ant:/export/f $ sh
ant:/export/f $ echo $SHELL
/usr/bin/ksh
ant:/export/f $

It doesnt show because the variable SHELL was set at login time...


All the best
Victor
Victor_138
Regular Advisor

Re: Problem with some commands

kcspecdp # lvlnboot -v
lvlnboot: Couldn't query physical volume "/dev/dsk/c0t8d0":
The specified path does not correspond to physical volume attached to
this volume group

kcspecdp # vgdisplay vg00
vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c0t8d0":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 9
Open LV 9
Max PV 16
Cur PV 2
Act PV 1
Max PE per PV 2200
VGDA 2
PE Size (Mbytes) 4
Total PE 1023
Alloc PE 752
Free PE 542
Total PVG 0
Victor BERRIDGE
Honored Contributor

Re: Problem with some commands

OK
Do a vgdisplay vg00
then a vgdisplay -v vg00
then vgdisplay -v vg00|grep dsk

Is there anywhere the word stale?


All the best
Victor
Victor BERRIDGE
Honored Contributor

Re: Problem with some commands

Do you know if vg00 is mirrored?
e.g.
$ vgdisplay -v vg00
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 14
Open LV 14
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 4350
VGDA 4
PE Size (Mbytes) 8
Total PE 8680
Alloc PE 7578
Free PE 1102
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg00/lvol1
LV Status available/syncd
LV Size (Mbytes) 304
Current LE 38
Allocated PE 76
Used PV 2
etc...


Noticed:
Used PV 2
meaning on 2 pv (physical volumes)
All the best
Victor
Victor BERRIDGE
Honored Contributor

Re: Problem with some commands

Still here?

My concern is you seem to be with a missing/failing disk so knowing if you are mirrored or not is quite important...


All the best
Victor
Victor_138
Regular Advisor

Re: Problem with some commands

I believe so

kcspecdp # vgdisplay -v vg00
vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c0t8d0":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 9
Open LV 9
Max PV 16
Cur PV 2
Act PV 1
Max PE per PV 2200
VGDA 2
PE Size (Mbytes) 4
Total PE 1023
Alloc PE 752
Free PE 542
Total PVG 0

vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c0t8d0":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
--- Logical volumes ---
LV Name /dev/vg00/lvol3
LV Status available/stale
LV Size (Mbytes) 144
Current LE 36
Allocated PE 72
Used PV 1

vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c0t8d0":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
LV Name /dev/vg00/lvol2
LV Status available/stale
LV Size (Mbytes) 512
Current LE 128
Allocated PE 256
Used PV 1

vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c0t8d0":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
LV Name /dev/vg00/lvol4
LV Status available/stale
LV Size (Mbytes) 512
Current LE 128
Allocated PE 256
Used PV 1

vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c0t8d0":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
LV Name /dev/vg00/lvol1
LV Status available/stale
LV Size (Mbytes) 84
Current LE 21
Allocated PE 42
Used PV 1

vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c0t8d0":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
LV Name /dev/vg00/lvol8
LV Status available/stale
LV Size (Mbytes) 552
Current LE 138
Allocated PE 276
Used PV 1

vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c0t8d0":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
LV Name /dev/vg00/lvol6
LV Status available/stale
LV Size (Mbytes) 604
Current LE 151
Allocated PE 302
Used PV 1

vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c0t8d0":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
LV Name /dev/vg00/lvol9
LV Status available/stale
LV Size (Mbytes) 512
Current LE 128
Allocated PE 256
Used PV 1

vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c0t8d0":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
LV Name /dev/vg00/lvol7
LV Status available/stale
LV Size (Mbytes) 64
Current LE 16
Allocated PE 32
Used PV 1

vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c0t8d0":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
LV Name /dev/vg00/lvol5
LV Status available/stale
LV Size (Mbytes) 24
Current LE 6
Allocated PE 12
Used PV 1


vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c0t8d0":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
--- Physical volumes ---
PV Name /dev/dsk/c0t4d0
PV Status available
Total PE 1023
Free PE 271
Victor BERRIDGE
Honored Contributor

Re: Problem with some commands

That wasnt theforamt of the output I expected...

Try strings /etc/lvmtab

You should see somtheing like
hpux $ strings /etc/lvmtab
/dev/vg00
/dev/dsk/c2t2d0
/dev/dsk/c1t2d0
/dev/s4vg01
/dev/dsk/c10t0d0
/dev/dsk/c10t0d1
....

What is under /dev/vg00?
/dev/dsk/c0t8d0
/dev/dsk/c0t4d0?


All the best
Victor
Victor BERRIDGE
Honored Contributor

Re: Problem with some commands

Im blind
The word stale appears in every volume. so you were mirrored and have a missing disk!

This + /dev/root issue makes quite a lot for a newbie (or arent you?)

Do an ioscan
then again ioscan -funC disk
and look what it says for /dev/dsk/c0t8d0


All the best
Victor