[tex-live] SOLVED Re: OT2 vs. T2A; compilation by apache user issues

mario chiari ml at mariochiari.net
Fri Feb 28 19:35:12 CET 2014


thanks to all, now it seems it works.

The trick was to give 755 permission to the entire texmf-var directory.

Note, I had run latex as user root as to create
folder /root/.texlive2013/texmf-var/fonts/tfm/lh/lh-t2a (with permission
dr-xr-x--T), and I had moved it under /urs/local/texlive/2013/, but that
was not good enough. Apparently, I needed to change permissions too.

I was/am confused by the following: if I run my php script with
(pdf)latex commands as user apache, restricted permission as above,
latex/kpathsea/mktexmf then
creates /var/www/.texlive2013/texmf-var/fonts/source/lh/lh-t2a/ and this
is good enough too (I mean, even without changing permission as above):

/usr/local/texlive/2013/texmf-var/aliases: Permission denied
This is METAFONT, Version 2.718281 (TeX Live 2013)
kpathsea: Running mktexmf larm1200
/usr/local/texlive/2013/texmf-var/aliases: Permission denied
mktexmf: /var/www/.texlive2013/texmf-var/fonts/source/lh/lh-t2a/larm1200.mf: successfully generated.

However, even having /var/www/.texlive2013/ already around is not good
enough, if I call my php script from my web client. I am not sure why
(yes I know this is not a TeX issue). 

So, sorry to have bothered you so much, but I am happy your patience and
a number of hints helped me to find a fix. 

thanks so much


On Fri, 2014-02-28 at 07:53 +0900, Norbert Preining wrote:
> On Thu, 27 Feb 2014, mario chiari wrote:
> Mario: Please learn:
> * environment settings when a script is run under Apache/php
> * configuration of TeX Live (see my hint concerning mktex.cnf)
> We are not consulting office for your Apache problems. 

> E.g.:
> * Do you know under which UID the php script is run?
either root or apache; apache runs httpd.

> * Does this user have the proper permissions for the $HOME that is set up?
yes, I think so
bash-4.2$ ls -l
drwxr-xr-x. 10 apache apache  4096 Feb 28 18:21 www
bash-4.2$ cd www
bash-4.2$ ls -lA
drwxr-xr-x. 45 root      root    4096 Feb 27 22:11 html
drwxr-xr-x   3 apache    apache  4096 Feb 28 17:53 .texlive2013

> * Are all the programs in the search path of the UID?
bash-4.2$ su root
[root at localhost ]# echo $PATH
/usr/local/texlive/2013/bin/i386-linux: ...
[root at localhost ]# su apache
bash-4.2$ echo $PATH
/usr/local/texlive/2013/bin/i386-linux: ...

> THese are all basic *unix* questions, not TeX Live.
Yes (and I am not a *unix* developer for sure)
> > now, how do I do that? What is considered root directory here? Which
> > argument should I pass to have larm1728.mf available to my web server?
> NONONON, no destdir. Arrrgggg.
> AFAIR this *is* the correct setup for php, that $HOME is /var/www
> and not /var/www/html

Fedora has /var/www/html as default document root for default Apache
configuration, I do know why. 

More information about the tex-live mailing list