Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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.
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)
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)
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.
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:
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:
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?
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
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.