1828667 Members
1491 Online
109984 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
K.Vijayaragavan.
Respected Contributor

Re: MAN not working

Hi,

As is know if a command is not working because of PATH problem it should give "No manual entry for ls (command)".

use the command " find / -name man | xargs ls -l | pg" to see the permissions of man related files. all these files should grant executable permission to (owner,group and others).

-Vijay




"Let us fine tune our knowledge together"
TMcB
Super Advisor

Re: MAN not working

The permissions are as follows :

-r-xr-xr-x 1 bin bin 24576 Jun 10 1996 /usr/bin/man
-rwxrwxrwx 1 root sys 10240 Nov 22 14:25 /usr2/sgmbin/man

I'm still not sure how to get "which man" to change to /usr/bin/man for root.

Thanks

Paula J Frazer-Campbell
Honored Contributor

Re: MAN not working

Terry

Have a look at /etc/MANPATH and remove usr2 from it.

Paula
If you can spell SysAdmin then you is one - anon
Ruediger Noack
Valued Contributor

Re: MAN not working

Terry,

/usr2/sgmbin/man is included in the PATH variable. You have to reorganize PATH.
Look at Marks suggestion. I'd prefer the first method.

Ruediger

Paula J Frazer-Campbell
Honored Contributor

Re: MAN not working

Terry

Also check /etc/profile for the path info.


Paula
If you can spell SysAdmin then you is one - anon
TMcB
Super Advisor

Re: MAN not working


Thanks everyone for all your help.

/usr2/sgm is not defined in /etc/profile - so I'm trying to find it elsewhere.
Ruediger Noack
Valued Contributor

Re: MAN not working

/.profile or /root/.profile, depending from your root home dir?
Or any script you start from there?

Ruediger
Mark van Hassel
Respected Contributor

Re: MAN not working

Terry,

Check /etc/PATH

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