1751939 Members
4838 Online
108783 Solutions
New Discussion юеВ

MAN not working

 
SOLVED
Go to solution
TMcB
Super Advisor

MAN not working

Hi folks

When I try to access help on anything I am getting the following error message :
[/]> man lp
sh: man: Execute permission denied.

I am logged in as root. But I have discovered that if I run > su
it then lets me access man pages.
The MANPATH variable is set correctly.

Thanks you for your help.
17 REPLIES 17
Paula J Frazer-Campbell
Honored Contributor

Re: MAN not working

Terry

Sounds like a path problem.

Check roots env.


Paula
If you can spell SysAdmin then you is one - anon
Mark van Hassel
Respected Contributor

Re: MAN not working

What are the permissions on /usr/bin/man ?
Check with "which man" which file is looked up first in your PATH.

HtH,

Mark
The surest sign that life exists elsewhere in the universe is that none of it has tried to contact us
Steve Steel
Honored Contributor

Re: MAN not working

Hi

login as root

whence man

You will probably find a non executable file called man.


su uses another path


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
TMcB
Super Advisor

Re: MAN not working

roots variable is as follows :

MANPATH=/usr/share/man/%:/usr/share/man:/usr/contrib/man/%:/usr/contrib/sr/local/man/%:/usr/local/man:/opt/pd/share/man/%:/opt/pd/share/man:/optman/%L:/opt/perf/man:/share/man:/opt/hpxt/enware/man:/opt/hparray/share/maopt/hparray/share/man:/opt/graphics/starbase/share/man:/opt/audio/share/ma/blinklink/share/man:/opt/ansic/share/man/%L:/opt/ansic/share/man:/opt/lan/share/man/%L:/opt/langtools/share/man:/opt/video/share/man:/opt/videoout/man:/opt/imake/man:/opt/networker/man


When i su, the variable is exactly the same.

TMcB
Super Advisor

Re: MAN not working

Hi folks

Hi folks, which man shows the following
root : /usr2/sgmbin/man
su : /usr/bin/man


Do I need to change root to /usr/bin/man??

Thanks
Paula J Frazer-Campbell
Honored Contributor

Re: MAN not working

Terry

Try this :-

/usr/bin/man man

Does it bing up the man on man?
If so then you have a file called man in the path before /usr/bin/man, do a find from /.

find . -name man -print | more

Paula
If you can spell SysAdmin then you is one - anon
Paula J Frazer-Campbell
Honored Contributor

Re: MAN not working

Terry

YES to your question.


Paula
If you can spell SysAdmin then you is one - anon
Mark van Hassel
Respected Contributor
Solution

Re: MAN not working

Make sure that /usr/bin is before /usr2/... in your PATH. Or if you do not need the /usr2/... remove it.

Another option is to add an alias to the shell profiles for /usr/bin/man, i.e
alias man='/usr/bin/man'

Good Luck,

Mark
The surest sign that life exists elsewhere in the universe is that none of it has tried to contact us
TMcB
Super Advisor

Re: MAN not working

/usr/bin/man man worked from root

Where could the /usr2/sgmbin/man be set from - it isn't included in the MANPATH variable?
How can I get 'which man' from root to show /usr/bin/man?

Thanks