Operating System - HP-UX
1843410 Members
4417 Online
110215 Solutions
New Discussion

Re: man doesn't work for non-root user

 
SOLVED
Go to solution

man doesn't work for non-root user

users with an uid greater than zero cannot use man for some reason. The MANPATH checks out ok, and a catman -w tells the user that they don't have permission to mv /usr/share/lib/whatis. I changed permissions on that file and directory, and ran catman -w again and got access denials for everything in /usr/share/man/. The man command works for the nonroot users, because if they type just man and then hit enter it will give the typical usage error message. Plus they can also use the man -k keyword feature of man. However when they type man command it says no manual entry for command, where command is any command i.e. cp, man, mv.
However, I was able to make man work for a nonroot user on a backup server by changing permisions to everything in /usr/share/man to 777, but I wanted to know if there was better way.
4 REPLIES 4
Steven E. Protter
Exalted Contributor
Solution

Re: man doesn't work for non-root user

I don't think you need to go 777.

ll -d /usr/man

dr-xr-xr-x

I don't think you want users writing to the man files.

My permissions on the files them shelves is read only all users.

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
Con O'Kelly
Honored Contributor

Re: man doesn't work for non-root user

Hi William

As you've already surmised it appears to be a problem with permissions in /usr/share/man directory.

My understanding is that permissions for this directory should be r-xr-xr-x (555).

The sub-directories should have the following permissions:
cat*.Z rwxrwxrxt
man* r-xr-xr-x
man*.Z r-xr-xr-x

Don't know if that will help but might be worth a try.

Cheers
Con


A. Clay Stephenson
Acclaimed Contributor

Re: man doesn't work for non-root user

Typically, all directories under /usr/share/man are owned by bin; group bin. The first thing you should do to clean all this up is:

cd /usr/share/man
chown -R bin:bin *

Surprisingly there ARE directories and files under man that you want to have more open permissions. Those are the cat* directories and the files beneath them. The reason for that is that these are formatted versions of the files under man*. A regular user dos a man ls for example; man first searchs for the file under cat* if not found if looks in man*, runs m4 on it and saves a version under cat* so that subsequent access of the same man page will be faster.

The man* directories should have mode set to 555 and the files below them should be set to mode 444.

The cat* directories should be set to 777 and the files below them to 666. If the wide-open modes of the cat* files bother you then simply set all the cat* directories to 000 and man will still work but will not optimize subsequent man page accesses. The only real security risk here is that someone could alter a man page to give bogus instructions to some trusting user.


If it ain't broke, I can fix that.

Re: man doesn't work for non-root user

Thanks for the help. I changed the permissions to 555 for the /usr/share/man directory and it worked. I was mostly worried that it was something other than a permissions settting. Thanks again.