Operating System - HP-UX
1838600 Members
3101 Online
110128 Solutions
New Discussion

Re: man pages not working

 
Juquin_3
Advisor

man pages not working

Hi ,

my man pages does not work !
The directory /usr/man have permissions (i.e. mode = 55 owner=bin group= bin).
I can't run the command catman -w ,
the file /etc/MANPATH is correct ,
for example : the command more /usr/man/cat1.Z/passwd.1 give an empty file !! I don't understand ...

I think i should re-install the man pages ?

Somebody can help me ,

thanks ,
3 REPLIES 3
bhavin asokan
Honored Contributor

Re: man pages not working

hi,

the passwd.1 file is there in
/usr/man/man1.Z

see the contents of man1.Z ,man1m.Z,man2.Z,..........

and check these directory and file permissions.

regds,
Juquin_3
Advisor

Re: man pages not working

I found passwd.1 passwd.4 passwd.5 in directories /usr/man/man1.Z ,man4.Z and man5.Z with permissions r--r--r-- (bin : bin ) and the directoies have permissions
r-xr-xr-x (bin : bin) .
I compare it with an another same server ; the results are equals !!
The command 'more /usr/man/man1.Z/uname.1' give data on the second server whereas the first server give nothing ?


Bill Hassell
Honored Contributor

Re: man pages not working

There is no /usr/man directory. It has been obsolete for more than a decade (just like /bin and /lib). If you use ll, you'll see:

ll /usr/man
lr-xr-xr-t 1 root sys 14 Oct 29 2003 /usr/man@ -> /usr/share/man

That is a symbolic link, or more accurately, a transition link and is used to keep very old scripts and programs working until they can be rewritten to use the V.4 filesystem layout and naming conventions. The permissions for the symlink are unimportant. Check the permissions for /usr/share and /usr/share/man:

ll -d /usr/share /usr/share/man
dr-xr-xr-x 7 bin bin 96 Oct 9 2003 /usr/share/
dr-xr-xr-x 37 bin bin 8192 Mar 6 2004 /usr/share/man/

Permissions must be 555 for these directories. Now check the man* and cat* directories (use: ll -d /usr/share/man/man* /usr/share/man/cat*). There is a big (and important) difference between them. man* directories must be 555 but cat* directories must be 777. If someone has tried to "improve" security, they may have messed up the man pages. cat* directories are open permission so anyone reading an unformatted page will be able to drop a copy into the corresponding cat directory for others to use. If you remove all the cat directories, then no preformatted pages will be saved and man will always have the "formatting...please wait" message.

NOTE: Using more or cat to list the contents of any cat* directories. These files are compressed and will display gibberish on the screen. Check the sixe of the file first:

ll /usr/share/man/cat1.Z/passwd.1
-rw-rw-rw- 1 root sys 9412 Nov 5 2003 /usr/share/man/cat1.Z/passwd.1

Now list the contents:

cat /usr/share/man/cat1.Z/passwd.1 | zcat

If this file doesn't exist or is zero length then you have problems...reinstall the man pages. Note that zcat forces the filename to have .Z at the end so you use cat and pipe it to zcat. The unformatted pages are in /usr/share/man/man*.Z and they can be read the same way:

cat /usr/share/man/man1.Z/passwd.1 | zcat

Also make sure that the permissions for / /usr /tmp /var have not been changed:

ll -d / /usr /tmp /var
drwxr-xr-x 24 root root 8192 Nov 11 08:20 /
drwxrwxrwt 8 bin bin 8192 Jan 5 01:13 /tmp
dr-xr-xr-x 25 bin bin 8192 Oct 24 2003 /usr
dr-xr-xr-x 27 bin bin 8192 May 3 2004 /var

Bad things will happen when these top level directory permissions and ownerships get changed.


Bill Hassell, sysadmin