1847338 Members
2587 Online
110264 Solutions
New Discussion

where is my man page?

 
SOLVED
Go to solution
Steve Lewis
Honored Contributor

where is my man page?

HP-UX 11.00

$ man chmod

No matches for column name -x

$ echo $MANPATH
/usr/share/man/%L:/usr/share/man:/usr/contrib/man/%L:/usr/contrib/man:/usr/local/man/%L:/usr/local/man:/opt/upgrade/share/man/%L:/opt/upgrade/share/man:/usr/dt/share/man:/opt/pd/share/man/%L:/opt/pd/share/man:/opt/ignite/share/man/%L:/opt/ignite/share/man:/opt/samba/man://opt/perl/man:/opt/resmon/share/man:/opt/pred/share/man/%L:/opt/pred/share/man:/opt/hparray/share/man/%L:/opt/hparray/share/man:/opt/perf/man/%L:/opt/perf/man:/opt/OV/man/itose/%L:/opt/OV/man/itose:/opt/audio/share/man:/opt/ansic/share/man/%L:/opt/ansic/share/man:/opt/langtools/share/man/%L:/opt/langtools/share/man:/opt/imake/man:/opt/hpnpl//man:/opt/lsof/man:/opt/rexx/man

Same result for man 1 chmod.

man 2 chmod (system call) gives the man page OK.
man on various other commands seems to be OK.
Any ideas what's wrong and how to fix it?

8 REPLIES 8
RAC_1
Honored Contributor

Re: where is my man page?

whereis chmod

Do you have it?? I meas accidental delete etc??? IF you have, does the man path returned from above command in your MANPATH??

Anil
There is no substitute to HARDWORK
Pete Randall
Outstanding Contributor

Re: where is my man page?

Steve,

What happens if you try:

find /usr/share/man -name chmod*
/usr/share/man/cat1.Z/chmod.1
/usr/share/man/man1.Z/chmod.1
/usr/share/man/man2.Z/chmod.2
/usr/share/man/ja_JP.eucJP/man1.Z/chmod.1
/usr/share/man/ja_JP.eucJP/man2.Z/chmod.2
/usr/share/man/ja_JP.SJIS/man1.Z/chmod.1
/usr/share/man/ja_JP.SJIS/man2.Z/chmod.2


Pete

Pete
Steven E. Protter
Exalted Contributor

Re: where is my man page?

For enhanced man pages....

catman -w

chmod is on all my systems as a man page. Did you check the obvious problem as in the actual file is missing?

SEP
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
Steve Lewis
Honored Contributor

Re: where is my man page?

$ whereis chmod
chmod: /sbin/chmod /usr/bin/chmod /usr/share/man/man1.Z/chmod.1 /usr/share/man/man2.Z/chmod.2

$ cd /usr/share/man
$ find . -name chmod*
./cat1.Z/chmod.1
./cat2.Z/chmod.2
./man1.Z/chmod.1
./man2.Z/chmod.2

Hmmm... lets look at the files:
$ find . -name chmod* | xargs -i ll {}
-rw-rw-rw- 1 mc2000 devamarta 39 Dec 19 2002 ./cat1.Z/chmod.1
-rw-rw-rw- 2 root sys 4373 Jan 24 2003 ./cat2.Z/chmod.2
-r--r--r-- 1 bin bin 4571 Nov 7 1997 ./man1.Z/chmod.1
-r--r--r-- 2 bin bin 3419 Oct 27 1997 ./man2.Z/chmod.2

Somehow the man page has become owned or overwritten by one of my users, and it has 666 perms, along with chmod.2 !!!!!!!!!!!!!!
Ironically he was the one that complained about it.
We never have anything to do with changing manpages and cannot think of anything in the past that I or my fellow sysadmins could have done to change it.
Could something have caused a corruption to the file as it was being unpacked for him to view it?




Pete Randall
Outstanding Contributor

Re: where is my man page?

That looks much like what I see:

find /usr/share/man -name chmod* | xargs -i ll {}
-rw-rw-rw- 1 plr support 5814 Aug 11 09:31 /usr/share/man/cat1.Z/chmod.1
-r--r--r-- 1 bin bin 4777 Nov 14 2000 /usr/share/man/man1.Z/chmod.1
-r--r--r-- 2 bin bin 3923 Nov 14 2000 /usr/share/man/man2.Z/chmod.2

The cat1.Z one is owned by me. I'll check on another box.

On other boxes, it's owned by root with the same permissions and stays that way even after I do a "man chmod".

What happens if you try fixing the ownership back to root?


Pete

Pete
Pete Randall
Outstanding Contributor
Solution

Re: where is my man page?

Steve,

I'm not sure how it happened, but the key seems to be the size of the file rather than the ownership. Yours is only 39 bytes long - far too small for a legitimate man page. Can you copy it over from another machine?


Pete

Pete
Steve Lewis
Honored Contributor

Re: where is my man page?

Thanks for confirming that I didnt have a horrific security breach.
I copied the file in from another system (same os level) and it is fine now.

Bill Hassell
Honored Contributor

Re: where is my man page?

man pages may appear to be a security risk because of the wide open permissions of files and directories. The man directories (look at /usr/share/man) should be 555 or 755 but the cat*.Z directories will be 777 and the files 666. These permission are necessary to provide pre-formatted man pages (the result of: formatting, please wait...) for anyone on the system. Once the man page has been viewed one time, the man program now looks in the cat*.Z directory to avoid using the formatter.

Since nothing but text files exist iin this directory, it is a fairly low risk. But for a truly paranoid server, you can remove all the cat*.Z directories (and their contents). Now, every man page request will say "formatting...please wait" and no 666/777 permissions will be found. Use the values in /etc/MANPATH to locate all the active man page directories.


Bill Hassell, sysadmin