LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-05-2018, 06:04 PM   #1
ehereth
LQ Newbie
 
Registered: Jul 2017
Location: Chattanooga TN
Posts: 15

Rep: Reputation: Disabled
man not working if man pages are on NFS share


I have come across a strange issue where I've installed a program (texlive 2018) on an NFS share and now I'm trying to add its man pages to my MANPATH. No matter what I try, I'm unable to get this to work. I keep getting errors.

I'm certain that I'm modifying the MANPATH OK, e.g., it looks like
Quote:
/apps/texlive/2018/texmf-dist/doc/man:/usr/share/man
If I simply type
Code:
man tlmgr
I get
Quote:
No manual entry for tlmgr
but I know it's there. If I try
Code:
man /apps/texlive/2018/texmf-dist/doc/man/man1/tlmgr.1
I get
Quote:
man: can't open /apps/texlive/2018/texmf-dist/doc/man/man1/tlmgr.1: Permission denied
But, the permissions match those of the man pages in
Code:
/usr/share/man/man1/
I'm at a loss. If I copy the same man page to
Code:
/tmp/
and run
Code:
man /tmp/tlmgr.1
all works as expected. I've had no luck finding help on the internet about this but I have a hard time believing others haven't experienced this before.

This problem is on Kubuntu 18.04, and I've tried this as a 'normal' user on machines with 'no_root_squash' and 'root_squash' enabled on the NFS side.

Any help would be appreciated.

Cheers!
 
Old 07-05-2018, 06:11 PM   #2
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,973

Rep: Reputation: 271Reputation: 271Reputation: 271
Code:
makewhatis
Whoops! makewhatis has been superseded by mandb. Read the mandb page to make sure you run it right. makewhatis ignored manpath so one had to specify what additional directories had to be searched.

Last edited by RandomTroll; 07-05-2018 at 07:28 PM.
 
Old 07-05-2018, 06:54 PM   #3
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Quote:
Originally Posted by ehereth View Post
I have come across a strange issue where I've installed a program (texlive 2018) on an NFS share and now I'm trying to add its man pages to my MANPATH. No matter what I try, I'm unable to get this to work. I keep getting errors.

I'm certain that I'm modifying the MANPATH OK, e.g., it looks like

If I simply type
Code:
man tlmgr
I get but I know it's there. If I try
Code:
man /apps/texlive/2018/texmf-dist/doc/man/man1/tlmgr.1
I get But, the permissions match those of the man pages in
Code:
/usr/share/man/man1/
I'm at a loss. If I copy the same man page to
Code:
/tmp/
and run
Code:
man /tmp/tlmgr.1
all works as expected. I've had no luck finding help on the internet about this but I have a hard time believing others haven't experienced this before.

This problem is on Kubuntu 18.04, and I've tried this as a 'normal' user on machines with 'no_root_squash' and 'root_squash' enabled on the NFS side.

Any help would be appreciated.

Cheers!
Make sure the access controls to the NFS mount permit reading. This would include a mount including read, and world access to the files is read (which you likely do have).

With NFS you might also check how anonymous uses access the files (sometimes this is disabled) - this can affect access if the user doesn't have an account on the NFS server. This causes the UID to be mapped to "nfsnobody" or "nobody" (depending on how the server is configured). IF nobody/nfsnobody has no access then it would be unable to read the files.

This can appear confusing depending on how the file was copied to /tmp (as in "no root squash" option)

Last edited by jpollard; 07-05-2018 at 06:56 PM.
 
Old 07-05-2018, 07:06 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,020

Rep: Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630
I'd kind of be thinking the share permissions too but looking at first reply makes me think manpath issue.

http://man7.org/linux/man-pages/man5/manpath.5.html

Or move man files to default location.

Last edited by jefro; 07-05-2018 at 07:07 PM.
 
Old 07-06-2018, 09:32 AM   #5
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by jefro View Post
I'd kind of be thinking the share permissions too but looking at first reply makes me think manpath issue.

http://man7.org/linux/man-pages/man5/manpath.5.html

Or move man files to default location.
and/or move the new manpath to the front of the "line"...?

my (OSx) version of
Code:
man man
says
"If you don't specify -M but set the MANPATH environment variable, the value of that variable is the list of the directories that man searches."

Yours may similarly be affected.
Code:
man man
is where I'd start.
 
Old 07-07-2018, 03:17 PM   #6
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,832

Rep: Reputation: 1219Reputation: 1219Reputation: 1219Reputation: 1219Reputation: 1219Reputation: 1219Reputation: 1219Reputation: 1219Reputation: 1219
Quote:
man: can't open /apps/texlive/2018/texmf-dist/doc/man/man1/tlmgr.1: Permission denied
Can you cat the file?
 
Old 07-07-2018, 06:55 PM   #7
X-LFS-2010
Member
 
Registered: Apr 2016
Posts: 510

Rep: Reputation: 58
> makewhatis has been superseded by mandb

that's not true. he can use whichever he likes

my debt has superceeded your debt right?

MAKEWHATIS(8) BSD System Manager's Manual MAKEWHATIS(8)

NAME
makewhatis -- create whatis database

SYNOPSIS
makewhatis [-a] [-i column] [-n name] [-o file] [-v] [-L]
[directories ...]

------------------

the newest Apple High Sierra has makewhatis (their version was not copylefted and renamed, controlled by who copylefted it by trying to coerce others to use it)

/usr/src/man-1.5p/src/makewhatis

http://www.kernel.org/pub/linux/util...an-1.5p.tar.gz

----------------------

you will always hear from certain distros that their version is the "right version" and others they don't (yet) control are "depreciated" or dumb. don't believe it.

while many gnu or gpl software copyleft and are clean: there are some definite actors out there who heist software, try to eliminate the original author work, tamper with software, and insure software is in all linux OS releases without (hardly) a choice other than to use it

Last edited by X-LFS-2010; 07-07-2018 at 07:11 PM.
 
Old 07-08-2018, 08:49 AM   #8
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,973

Rep: Reputation: 271Reputation: 271Reputation: 271
Quote:
Originally Posted by X-LFS-2010 View Post
' makewhatis has been superseded by mandb
'"that's not true. he can use whichever he likes"'
He can use whatever he has. You went on to cite BSD. This is a Linux forum. Do you know of a Linux distribution that still has makewhatis?
 
Old 07-11-2018, 02:44 PM   #9
ehereth
LQ Newbie
 
Registered: Jul 2017
Location: Chattanooga TN
Posts: 15

Original Poster
Rep: Reputation: Disabled
All,

Thanks for all the updates, I've been busy and haven't had time to really dig back into this. For what it's worth, I'm running Kubuntu 18.04 and makewhatis is not installed on the workstation.

I'm not sure I follow completely how this is meant to work, but I believe that my MANPATH is correct, and that man is supposed to use it if it exists and fail back on other methods if it doesn't. Am I misunderstanding this? Do I need to do something with mandb (or anything else) after modifying the MANPATH in order for it work the way I expect it to?

Even if I run
Code:
man -M /apps/texlive/2018/texmf-dist/doc/man
I still get
Quote:
No manual entry for latexmk
Adding the -d flag results in the following

Quote:
ruid=644, euid=644
rgid=500, egid=500
++priv_drop_count = 1
From the config file /etc/manpath.config:

Mandatory mandir `/usr/man'.
Mandatory mandir `/usr/share/man'.
Mandatory mandir `/usr/local/share/man'.
Path `/bin' mapped to mandir `/usr/share/man'.
Path `/usr/bin' mapped to mandir `/usr/share/man'.
Path `/sbin' mapped to mandir `/usr/share/man'.
Path `/usr/sbin' mapped to mandir `/usr/share/man'.
Path `/usr/local/bin' mapped to mandir `/usr/local/man'.
Path `/usr/local/bin' mapped to mandir `/usr/local/share/man'.
Path `/usr/local/sbin' mapped to mandir `/usr/local/man'.
Path `/usr/local/sbin' mapped to mandir `/usr/local/share/man'.
Path `/usr/X11R6/bin' mapped to mandir `/usr/X11R6/man'.
Path `/usr/bin/X11' mapped to mandir `/usr/X11R6/man'.
Path `/usr/games' mapped to mandir `/usr/share/man'.
Path `/opt/bin' mapped to mandir `/opt/man'.
Path `/opt/sbin' mapped to mandir `/opt/man'.
Global mandir `/usr/man', catdir `/var/cache/man/fsstnd'.
Global mandir `/usr/share/man', catdir `/var/cache/man'.
Global mandir `/usr/local/man', catdir `/var/cache/man/oldlocal'.
Global mandir `/usr/local/share/man', catdir `/var/cache/man/local'.
Global mandir `/usr/X11R6/man', catdir `/var/cache/man/X11R6'.
Global mandir `/opt/man', catdir `/var/cache/man/opt'.
Added section `1'.
Added section `n'.
Added section `l'.
Added section `8'.
Added section `3'.
Added section `2'.
Added section `3posix'.
Added section `3pm'.
Added section `3perl'.
Added section `3am'.
Added section `5'.
Added section `4'.
Added section `9'.
Added section `6'.
Added section `7'.
`/usr/man' `' `1'
`/usr/share/man' `' `1'
`/usr/local/share/man' `' `1'
`/bin' `/usr/share/man' `0'
`/usr/bin' `/usr/share/man' `0'
`/sbin' `/usr/share/man' `0'
`/usr/sbin' `/usr/share/man' `0'
`/usr/local/bin' `/usr/local/man' `0'
`/usr/local/bin' `/usr/local/share/man' `0'
`/usr/local/sbin' `/usr/local/man' `0'
`/usr/local/sbin' `/usr/local/share/man' `0'
`/usr/X11R6/bin' `/usr/X11R6/man' `0'
`/usr/bin/X11' `/usr/X11R6/man' `0'
`/usr/games' `/usr/share/man' `0'
`/opt/bin' `/opt/man' `0'
`/opt/sbin' `/opt/man' `0'
`/usr/man' `/var/cache/man/fsstnd' `-1'
`/usr/share/man' `/var/cache/man' `-1'
`/usr/local/man' `/var/cache/man/oldlocal' `-1'
`/usr/local/share/man' `/var/cache/man/local' `-1'
`/usr/X11R6/man' `/var/cache/man/X11R6' `-1'
`/opt/man' `/var/cache/man/opt' `-1'
`1' `' `-5'
`n' `' `-5'
`l' `' `-5'
`8' `' `-5'
`3' `' `-5'
`2' `' `-5'
`3posix' `' `-5'
`3pm' `' `-5'
`3perl' `' `-5'
`3am' `' `-5'
`5' `' `-5'
`4' `' `-5'
`9' `' `-5'
`6' `' `-5'
`7' `' `-5'
is a tty
real user = 644; effective user = 644

using pager as pager

path directory /apps/cuda-8.0/bin is not in the config file
and doesn't have ../man, man, ../share/man, or share/man subdirectories

path directory /usr/local/sbin is in the config file
adding /usr/local/man to manpath
adding /usr/local/share/man to manpath

path directory /usr/local/bin is in the config file
/usr/local/man is already in the manpath
/usr/local/share/man is already in the manpath

path directory /usr/sbin is in the config file
adding /usr/share/man to manpath

path directory /usr/bin is in the config file
/usr/share/man is already in the manpath

path directory /sbin is in the config file
/usr/share/man is already in the manpath

path directory /bin is in the config file
/usr/share/man is already in the manpath

path directory /usr/games is in the config file
/usr/share/man is already in the manpath

path directory /usr/local/games is not in the config file
but does have a ../man, man, ../share/man, or share/man subdirectory
/usr/local/man is already in the manpath

path directory /snap/bin is not in the config file
and doesn't have ../man, man, ../share/man, or share/man subdirectories

adding mandatory man directories

warning: /usr/man: No such file or directory
/usr/share/man is already in the manpath
/usr/local/share/man is already in the manpath
manpath search path (with duplicates) = /apps/texlive/2018/texmf-dist/doc/man/
warning: /apps/texlive/2018/texmf-dist/doc/man: Permission denied
final search path =
--priv_drop_count = 0
No manual entry for latexmk
++priv_drop_count = 1
I can however, cat the man pages without any issues so I don't understand the permission error.

For what it's worth,
Code:
echo $MANOPT
returns nothing.

As far as NFS is concerned, I'm not sure what to check here. If I, as the user running man, have permission to cat the file, shouldn't man work? Unless it runs as a different user for some reason.

One other thing that a colleague of mine noticed that may be relevant here, if we start by running
Code:
man -d -M /apps/texlive/2018/texmf-dist/doc/man/ latexmk
and traverse up the directory tree, we get
Quote:
Permission denied
errors until we get to
Code:
man -d -M /apps/ latexmk
where the message changes to
Quote:
can't open directory /apps/: Stale file handle
Is this a lead? This same colleague wrote a small C program that issues the same call that generates the "Stale file handle" message in man (after digging around with strace) and his program successfully completes the call. Below is the strace line with the error:
Quote:
openat(AT_FDCWD, "/apps/", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ESTALE (Stale file handle)
Does anybody have any ideas about this? I'm still at a loss. Thanks a ton for your time and help.
 
Old 07-11-2018, 05:05 PM   #10
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,020

Rep: Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630
Then it begins to look like permissions for some group or user.
 
Old 07-12-2018, 10:10 AM   #11
ehereth
LQ Newbie
 
Registered: Jul 2017
Location: Chattanooga TN
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jefro View Post
Then it begins to look like permissions for some group or user.
I don't follow though, if my user (me) can cat the file shouldn't the same user (again, me) be able to access the page with man? Maybe I'm missing something about the way man works, does it not run as the same user who calls it?
 
Old 07-13-2018, 12:29 AM   #12
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,973

Rep: Reputation: 271Reputation: 271Reputation: 271
Quote:
Originally Posted by ehereth View Post
if my user (me) can cat the file shouldn't the same user (again, me) be able to access the page with man?
Yes.

Quote:
Originally Posted by ehereth View Post
does it not run as the same user who calls it?
Unless the sticky bit is set; it isn't on man on my computer.

Edit mandb.conf to add the directories you want mandb to index, then run mandb. If it doesn't solve your problem it may report problems with the man pages.
 
Old 07-13-2018, 02:33 AM   #13
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,832

Rep: Reputation: 1219Reputation: 1219Reputation: 1219Reputation: 1219Reputation: 1219Reputation: 1219Reputation: 1219Reputation: 1219Reputation: 1219
Examine the mount point with
Code:
ls -lid /apps
ls -lid /apps/
df /apps
df /apps/
If this says "stale" then try to remount
Code:
umount /apps
mount /apps
 
Old 07-13-2018, 08:20 AM   #14
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Quote:
Originally Posted by ehereth View Post
I don't follow though, if my user (me) can cat the file shouldn't the same user (again, me) be able to access the page with man? Maybe I'm missing something about the way man works, does it not run as the same user who calls it?
Normally the answer is "yes".

NFS provides a user id/group mapping though, and if an entry is missing, it gets mapped to "nobody" (or "NFSnobody" depending on configurations). That "nobody"/"NFSnobody" can be mapped to mean "no access".

But being able to cat the file SHOULD mean man can read it. At that point it depends on the MANPATH environment variable, and local configurations. You can check some of that with the -w and or -W options (one prints the locations of the nroff files, the other prints the locations of the cat file versions).

You can also check the file /etc/man_db.conf for locations.

The other POSSIBLE issues is how the pager works... that is a separate program - and it may be having problems. The default utility is "less", but it depends on the input as to what it can do (it doesn't format - just displays text, so it is possible for the content reference to point to a file that doesn't exist, but the source may.)

You can test that by using "-P cat". This would look like the cat of the file that is to be used. NOTE, this file has been processed from raw man pages (which has formatting macros built in), which is the source to man (which formats it). The "catman" files have been "preformatted" - and are not the original files (like the one you used cat to display).

The error message is from "man", not from the pager program. So the error may not be from the original file, though that is the file "man" has for a reference.

Last edited by jpollard; 07-13-2018 at 08:22 AM.
 
Old 07-13-2018, 11:19 AM   #15
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
(edit output of man -d already posted)
 
  


Reply

Tags
man, man page, nfs



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
BLFS 8.1: OpenSP places man pages in usr/man jr_bob_dobbs Linux From Scratch 1 02-13-2018 07:23 PM
Need help with NFS, can't find what I need in the man pages... NoeticRapture Slackware 12 03-31-2010 10:37 PM
nfs mount not behaving as expected (according to man pages) pwabrahams Linux - Networking 7 10-21-2008 11:09 PM
MAN Pages stopped working ddimuc Slackware 1 08-26-2006 09:25 PM
Man Pages arent working MRK Linux - Software 2 07-03-2003 11:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration