running as apache user does not work, why?

Zdenek Wagner zdenek.wagner at gmail.com
Fri Aug 16 00:43:49 CEST 2019


Hi,

remember, that "apache" is not a normal user. Unless you have modified
/etc/passwd, it has no login shell. It will not read settings in shell
startup files used by normal users and root, hence it tries to use the
TeX distribution from Fedora packages, not TeX Live from TUG, as you
can see from the paths. In addition, it is not sufficient to define
environment variables in such a way that sudo will know about them.
When you later try to run TeX from a script invoked by the Apache
server, they will not work unless you define them in you config file
by SetEnv or PassEnv directives. It is better not to run TeX directly
but use a script which will define the necessary variables including
PATH and then call TeX.

Zdeněk Wagner
http://ttsm.icpf.cas.cz/team/wagner.shtml
http://icebearsoft.euweb.cz

čt 15. 8. 2019 v 21:13 odesílatel David Carlisle
<d.p.carlisle at gmail.com> napsal:
>
> It looks like the path for that account does not include /usr/local/texlive/2019/bin/x86_64-linux (or at least that is not before /usr/local/bin)
>
> David
>
>
> On Thu, 15 Aug 2019 at 19:47, mario chiari <ml at mariochiari.net> wrote:
>>
>> Hi
>>
>> I try to run the following from terminal:
>>
>> >  sudo -u apache  /usr/local/texlive/2019/bin/x86_64-linux/pdflatex  myFile.tex
>>
>> I get the following error
>>
>> >>>
>> LaTeX Font Warning: Font shape `T2A/wncyr/m/n' undefined
>> (Font)              using `T2A/cmr/m/n' instead on input line 3.
>>
>>
>> kpathsea: Running mktextfm larm1000
>> /usr/share/texlive/texmf-dist/web2c/mktexnam: Could not map source
>> abbreviation  for larm1000.
>> /usr/share/texlive/texmf-dist/web2c/mktexnam: Need to update ?
>> mkdir: cannot create directory ‘././usr/share/httpd/.texlive2018’: Permission
>> denied
>> mktextfm: mktexdir /usr/share/httpd/.texlive2018/texmf-
>> var/fonts/tfm/unknown/unknown failed.
>> kpathsea: Appending font creation commands to missfont.log.
>> ! Font T2A/cmr/m/n/10=larm1000 at 10.0pt not loadable: Metric (TFM) file not fo
>> und.
>> <<<
>>
>> Is kpathsea trying to call /usr/share/texlive/.../ instead of
>> /usr/local/texlive/2019/.../? Why?
>> I do not understand why it tries to write into  ‘././usr/share/httpd/; also
>> why .texlive2018  instead of .texlive2019?
>>
>>
>> Everything works fine if I run it as root (I am on a Fedora 29 machine).
>> Help is welcome
>>
>> thanks cheers
>> mario
>>
>>
>> ps this is an old issue of mine, with a new  glitch.
>>



More information about the tex-live mailing list