[Wikitex-l] Re: SELinux/web2c LaTeX permissions issues in WikiTeX<amsmath> (Peter Danenberg)
Lengyel, Florian
FLengyel at gc.cuny.edu
Thu Jan 26 19:41:45 CST 2006
This is in reply to Peter Danenberg's request.
I may not have reset my web server after changing the SELINUX variable
from SELINUX=enforcing to SELINUX=disabled (see below).
[mathwiki at cml wikitex]$ ./wikitex.sh amstest amsmath /extensions/wikitex/tmp/
<a href="/extensions/wikitex/tmp/amstest"><img src="/extensions/wikitex/tmp/amstest1.png" alt="amsmath" /></a>
[mathwiki at cml wikitex]$
Perhaps it would be better to procede from this point (whatever this point is),
than to attempt to reconstruct what I did to get there, as documented below.
The output is apparently complicated by changes in the input to wikitex.
A change from <amsmath>a \cdot b = c</amsmath> (which produces nothing)
to <amsmath>a \times b = c</amsmath> can produce a cascading sequence of errors.
The following story seems inconsistent...I don't understand the seemingly erratic
behavior (perhaps it is me):
1. yesterday I installed RT on the server where wikitex is installed.
It specifies that /etc/selinux/config should be modified. This is a big change:
from SELINUX=enforcing to SELINUX=disabled, which turns off all warnings.
2. With SELINUX=enforcing on, wikitex.sh required that the type of its security
context be changed from user_home_t to httpd_sys_script_exec_t. wikitex.sh did
not run with its security context type set to the default user_home_t. It was
necessary to change it to allow apache to execute it.
3. However, that was valid before I disabled SELINUX. Now attempts to execute the script
fail silently. To test the theory that the security context should be reset, I copied
wikitex.sh to wikitex0.sh, changed its context type to user_home_t, and ran the script
as indicated.
[mathwiki at cml wikitex]$ ./wikitex0.sh amstest amsmath /extensions/wikitex/tmp/
<a href="/extensions/wikitex/tmp/amstest"><img src="/extensions/wikitex/tmp/amstest1.png" alt="amsmath" /></a>
--------------------------------------------------------------------------------
Back to the wiki:
However, now an attempt to run wikitex results in the error:
WikiTeX: wikitex.sh is not executable.
with this code
= This is a test =
<amsmath> a\cdot b = c</amsmath>
x
Even with 777 permissions.
Well, that could be on account of \cdot, since if \cdot is changed to \times,
we get, with
[root at cml httpd]# ls -aZ ~mathwiki/www/extensions/wikitex/wikitex.sh
-rwxrwx--- mathwiki apache system_u:object_r:httpd_sys_script_exec_t /home/mathwiki/www/extensions/wikitex/wikitex.sh
the following cascading sequence of errors:
WikiTeX: latex reported a failure, namely:
This is TeX, Version 3.14159 (Web2C 7.4.5)
/usr/share/texmf/web2c/latex.fmt: Permission denied
/usr/share/texmf/web2c/latex.fmt: Permission denied
/usr/share/texmf/web2c/latex.fmt: Permission denied
/usr/share/texmf/web2c/latex.fmt: Permission denied
/usr/share/texmf/web2c/latex.fmt: Permission denied
/usr/share/texmf/web2c/latex.fmt: Permission denied
/usr/share/texmf/web2c/latex.fmt: Permission denied
/usr/share/texmf/web2c/latex.fmt: Permission denied
/usr/share/texmf/web2c/latex.fmt: Permission denied
/usr/share/texmf/web2c/latex.fmt: Permission denied
kpathsea: Running mktexfmt latex.fmt
running `tex -ini -jobname=latex -progname=latex latex.ini' ...
This is TeX, Version 3.14159 (Web2C 7.4.5) (INITEX)
(/usr/share/texmf/tex/latex/config/latex.ini
(/usr/share/texmf/tex/latex/base/latex.ltx
(/usr/share/texmf/tex/latex/config/texsys.cfg)
./texsys.aux found
\@currdir set to: ./.
Assuming \openin and \input
have the same search path.
Defining UNIX/DOS style filename parser.
catcodes, registers, compatibility for TeX 2, parameters,
LaTeX2e <2001/06/01>
hacks, control, par, spacing, files, font encodings, lengths,
====================================
Local config file fonttext.cfg used
====================================
(/usr/share/texmf/tex/generic/config/fonttext.cfg
(/usr/share/texmf/tex/latex/base/fonttext.ltx
=== Don't modify this file, use a .cfg file instead ===
(/usr/share/texmf/tex/latex/base/omlenc.def)
(/usr/share/texmf/tex/latex/base/t1enc.def)
(/usr/share/texmf/tex/latex/base/ot1enc.def)
(/usr/share/texmf/tex/latex/base/omsenc.def)
(/usr/share/texmf/tex/latex/base/t1cmr.fd)
(/usr/share/texmf/tex/latex/base/ot1cmr.fd)
(/usr/share/texmf/tex/latex/base/ot1cmss.fd)
(/usr/share/texmf/tex/latex/base/ot1cmtt.fd)))
====================================
Local config file fontmath.cfg used
====================================
(/usr/share/texmf/tex/generic/config/fontmath.cfg
(/usr/share/texmf/tex/latex/base/fontmath.ltx
=== Don't modify this file, use a .cfg file instead ===
(/usr/share/texmf/tex/latex/base/omlcmm.fd)
(/usr/share/texmf/tex/latex/base/omscmsy.fd)
(/usr/share/texmf/tex/latex/base/omxcmex.fd)
(/usr/share/texmf/tex/latex/base/ucmr.fd)))
====================================
Local config file preload.cfg used
=====================================
(/usr/share/texmf/tex/generic/config/preload.cfg
(/usr/share/texmf/tex/latex/base/preload.ltx)) page nos., x-ref, environments,
center, verbatim, math definitions, boxes, title, sectioning, contents,
floats, footnotes, index, bibliography, output,
===========================================
Local configuration file hyphen.cfg used
===========================================
(/usr/share/texmf/tex/generic/babel/hyphen.cfg
(/usr/share/texmf/tex/generic/hyphen/hyphen.tex)
(/usr/share/texmf/tex/generic/hyphen/frhyph.tex
frhyph.tex - French hyphenation patterns (V2.11) <2002/01/16>)
(/usr/share/texmf/tex/generic/hyphen/dehypht.tex
German Traditional Hyphenation Patterns `dehypht' Version 3.2a <1999/03/03>
(Formerly known under the name `ghyph31' and `ghyphen'.))
(/usr/share/texmf/tex/generic/hyphen/dehyphn.tex
New German Hyphenation Patterns `dehyphn' Rev.31 <2001-05-07> (WaS))
(/usr/share/texmf/tex/generic/hyphen/zerohyph.tex))
=================================
Applying patch file ltpatch.ltx
=================================
(/usr/share/texmf/tex/latex/base/ltpatch.ltx)
) )
Beginning to dump on file latex.fmt
(format=latex 2006.1.26)
4153 strings of total length 54052
43633 memory locations dumped; current usage is 144&41698
3034 multiletter control sequences
\font\nullfont=nullfont
\font\OMX/cmex/m/n/10=cmex10
\font\tenln=line10
\font\tenlnw=linew10
\font\tencirc=lcircle10
\font\tencircw=lcirclew10
\font\OT1/cmr/m/n/5=cmr5
\font\OT1/cmr/m/n/7=cmr7
\font\OT1/cmr/m/n/10=cmr10
\font\OML/cmm/m/it/5=cmmi5
\font\OML/cmm/m/it/7=cmmi7
\font\OML/cmm/m/it/10=cmmi10
\font\OMS/cmsy/m/n/5=cmsy5
\font\OMS/cmsy/m/n/7=cmsy7
\font\OMS/cmsy/m/n/10=cmsy10
3633 words of font info for 14 preloaded fonts
14 hyphenation exceptions
Hyphenation trie of length 23210 has 711 ops out of 35111
235 for language 3
207 for language 2
88 for language 1
181 for language 0
No pages of output.
Transcript written on latex.log.
rm: cannot remove `/usr/share/texmf/web2c/latex.log': Permission denied
mv: cannot stat `/usr/share/texmf/web2c/latex.log': Permission denied
rm: cannot remove `/usr/share/texmf/web2c/latex.fmt': Permission denied
mv: cannot stat `/usr/share/texmf/web2c/latex.fmt': Permission denied
/usr/share/texmf/web2c/mktexupd: /usr/share/texmf/web2c/latex.fmt not a file.
I can't find the format file `latex.fmt'!
At this point, I suspect that the security context type of wikitex.sh
has nothing to do with the error, so I will change it to user_home_t
and see what happens:
root at cml httpd]# cd ~mathwiki/www/extensions/wikitex
[root at cml wikitex]# chcon -t user_home_t wikitex.sh
[root at cml wikitex]#
this cascading series of errors:
WikiTeX: latex reported a failure, namely:
This is TeX, Version 3.14159 (Web2C 7.4.5)
/usr/share/texmf/web2c/latex.fmt: Permission denied
/usr/share/texmf/web2c/latex.fmt: Permission denied
/usr/share/texmf/web2c/latex.fmt: Permission denied
/usr/share/texmf/web2c/latex.fmt: Permission denied
/usr/share/texmf/web2c/latex.fmt: Permission denied
/usr/share/texmf/web2c/latex.fmt: Permission denied
/usr/share/texmf/web2c/latex.fmt: Permission denied
/usr/share/texmf/web2c/latex.fmt: Permission denied
/usr/share/texmf/web2c/latex.fmt: Permission denied
/usr/share/texmf/web2c/latex.fmt: Permission denied
kpathsea: Running mktexfmt latex.fmt
running `tex -ini -jobname=latex -progname=latex latex.ini' ...
This is TeX, Version 3.14159 (Web2C 7.4.5) (INITEX)
(/usr/share/texmf/tex/latex/config/latex.ini
(/usr/share/texmf/tex/latex/base/latex.ltx
(/usr/share/texmf/tex/latex/config/texsys.cfg)
./texsys.aux found
\@currdir set to: ./.
Assuming \openin and \input
have the same search path.
Defining UNIX/DOS style filename parser.
catcodes, registers, compatibility for TeX 2, parameters,
LaTeX2e <2001/06/01>
hacks, control, par, spacing, files, font encodings, lengths,
====================================
Local config file fonttext.cfg used
====================================
(/usr/share/texmf/tex/generic/config/fonttext.cfg
(/usr/share/texmf/tex/latex/base/fonttext.ltx
=== Don't modify this file, use a .cfg file instead ===
(/usr/share/texmf/tex/latex/base/omlenc.def)
(/usr/share/texmf/tex/latex/base/t1enc.def)
(/usr/share/texmf/tex/latex/base/ot1enc.def)
(/usr/share/texmf/tex/latex/base/omsenc.def)
(/usr/share/texmf/tex/latex/base/t1cmr.fd)
(/usr/share/texmf/tex/latex/base/ot1cmr.fd)
(/usr/share/texmf/tex/latex/base/ot1cmss.fd)
(/usr/share/texmf/tex/latex/base/ot1cmtt.fd)))
====================================
Local config file fontmath.cfg used
====================================
(/usr/share/texmf/tex/generic/config/fontmath.cfg
(/usr/share/texmf/tex/latex/base/fontmath.ltx
=== Don't modify this file, use a .cfg file instead ===
(/usr/share/texmf/tex/latex/base/omlcmm.fd)
(/usr/share/texmf/tex/latex/base/omscmsy.fd)
(/usr/share/texmf/tex/latex/base/omxcmex.fd)
(/usr/share/texmf/tex/latex/base/ucmr.fd)))
====================================
Local config file preload.cfg used
=====================================
(/usr/share/texmf/tex/generic/config/preload.cfg
(/usr/share/texmf/tex/latex/base/preload.ltx)) page nos., x-ref, environments,
center, verbatim, math definitions, boxes, title, sectioning, contents,
floats, footnotes, index, bibliography, output,
===========================================
Local configuration file hyphen.cfg used
===========================================
(/usr/share/texmf/tex/generic/babel/hyphen.cfg
(/usr/share/texmf/tex/generic/hyphen/hyphen.tex)
(/usr/share/texmf/tex/generic/hyphen/frhyph.tex
frhyph.tex - French hyphenation patterns (V2.11) <2002/01/16>)
(/usr/share/texmf/tex/generic/hyphen/dehypht.tex
German Traditional Hyphenation Patterns `dehypht' Version 3.2a <1999/03/03>
(Formerly known under the name `ghyph31' and `ghyphen'.))
(/usr/share/texmf/tex/generic/hyphen/dehyphn.tex
New German Hyphenation Patterns `dehyphn' Rev.31 <2001-05-07> (WaS))
(/usr/share/texmf/tex/generic/hyphen/zerohyph.tex))
=================================
Applying patch file ltpatch.ltx
=================================
(/usr/share/texmf/tex/latex/base/ltpatch.ltx)
) )
Beginning to dump on file latex.fmt
(format=latex 2006.1.26)
4153 strings of total length 54052
43633 memory locations dumped; current usage is 144&41698
3034 multiletter control sequences
\font\nullfont=nullfont
\font\OMX/cmex/m/n/10=cmex10
\font\tenln=line10
\font\tenlnw=linew10
\font\tencirc=lcircle10
\font\tencircw=lcirclew10
\font\OT1/cmr/m/n/5=cmr5
\font\OT1/cmr/m/n/7=cmr7
\font\OT1/cmr/m/n/10=cmr10
\font\OML/cmm/m/it/5=cmmi5
\font\OML/cmm/m/it/7=cmmi7
\font\OML/cmm/m/it/10=cmmi10
\font\OMS/cmsy/m/n/5=cmsy5
\font\OMS/cmsy/m/n/7=cmsy7
\font\OMS/cmsy/m/n/10=cmsy10
3633 words of font info for 14 preloaded fonts
14 hyphenation exceptions
Hyphenation trie of length 23210 has 711 ops out of 35111
235 for language 3
207 for language 2
88 for language 1
181 for language 0
No pages of output.
Transcript written on latex.log.
rm: cannot remove `/usr/share/texmf/web2c/latex.log': Permission denied
mv: cannot stat `/usr/share/texmf/web2c/latex.log': Permission denied
rm: cannot remove `/usr/share/texmf/web2c/latex.fmt': Permission denied
mv: cannot stat `/usr/share/texmf/web2c/latex.fmt': Permission denied
/usr/share/texmf/web2c/mktexupd: /usr/share/texmf/web2c/latex.fmt not a file.
I can't find the format file `latex.fmt'!
-----Original Message-----
From: wikitex-l-bounces at wikitex.org on behalf of Lengyel, Florian
Sent: Thu 1/26/2006 3:52 PM
To: wikitex-l at wikitex.org
Subject: [Wikitex-l] Re: SELinux/web2c LaTeX permissions issues in WikiTeX<amsmath> (Peter Danenberg)
Hi, I'm replying for Mike Carlisle.
The command:
[mathwiki at cml wikitex]$ ./wikitex.sh amstest amsmath /extensions/wikitex/tmp
[mathwiki at cml wikitex]$
Seems to do absolutely nothing!
FL
Message: 1
Date: Wed, 25 Jan 2006 18:50:49 -0500
From: Michael Carlisle <mcarlisle at gc.cuny.edu>
Subject: [Wikitex-l] [Fwd: Error messages] SELinux/web2c LaTeX
permissions issues in WikiTeX <amsmath>
Trying to get WikiTeX to run under Red Hat/SELinux using web2c's
implementation of LaTeX gave the errors below (sorry for the length).
Does someone understand the permissions issues we're having here? (I've
offset the errors for easier viewing... at the top and bottom.) Is this
even a WikiTeX permissions issue, or does it look like a deeper LaTeX
permissions issue?
Thanks in advance for your help!
Mike Carlisle
Mathematics Dept.
CUNY Graduate Center
[ snip ]
Message: 2
Date: Wed, 25 Jan 2006 17:54:28 -0600
From: Peter Danenberg <pcd at wikitex.org>
Subject: Re: [Wikitex-l] [Fwd: Error messages] SELinux/web2c LaTeX
permissions issues in WikiTeX <amsmath>
To: WikiTeX General <wikitex-l at wikitex.org>
Message-ID: <20060125235428.GB9139 at wikitex.org>
Content-Type: text/plain; charset="us-ascii"
> Is this even a WikiTeX permissions issue, or does it look like a
> deeper LaTeX permissions issue?
Would you mind, Mike, saving the attached file as
extensions/wikitex/tmp/amstest, and manually invoking:
./wikitex.sh amstest amsmath /extensions/wikitex/tmp/
from extensions/wikitex?
--
Peter Danenberg .
wikisophia.org ..:
-------------- next part --------------
\documentclass[12pt]{article}
\usepackage{amssymb,amsmath,amscd,concmath}
\pagestyle{empty}
\begin{document}
\begin{equation*}
\label{e:barwq}\begin{split}
H_c&=\frac{1}{2n} \sum^n_{l=0}(-1)^{l}(n-{l})^{p-2}
\sum_{l _1+\dots+ l _p=l}\prod^p_{i=1} \binom{n_i}{l _i}\\
&\quad\cdot[(n-l )-(n_i-l _i)]^{n_i-l _i}\cdot
\Bigl[(n-l )^2-\sum^p_{j=1}(n_i-l _i)^2\Bigr].
\end{split}
\end{equation*}
\end{document}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wikitex.org/pipermail/wikitex-l/attachments/20060126/b84b3cd6/attachment.html
More information about the Wikitex-l
mailing list