=========================== version information ==========================
tlmgr revision 66798 (2023-04-08 02:15:21 +0200)
tlmgr using installation: /opt/tinytex
TeX Live (https://tug.org/texlive) version 2023
==================== executables found by searching PATH =================
PATH: /usr/local/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/quarto/bin:/usr/lib/rstudio-server/bin/postback
dvipdfmx: /usr/local/bin/dvipdfmx
dvips: /usr/local/bin/dvips
fmtutil: /usr/local/bin/fmtutil
kpsewhich: /usr/local/bin/kpsewhich
luatex: /usr/local/bin/luatex
mktexpk: /usr/local/bin/mktexpk
pdftex: /usr/local/bin/pdftex
tex: /usr/local/bin/tex
tlmgr: /usr/local/bin/tlmgr
updmap: /usr/local/bin/updmap
xetex: /usr/local/bin/xetex
=========================== active config files ==========================
config.ps: /opt/tinytex/texmf-dist/dvips/config/config.ps
fmtutil.cnf: /opt/tinytex/texmf-dist/web2c/fmtutil.cnf
mktex.cnf: /opt/tinytex/texmf-dist/web2c/mktex.cnf
pdftexconfig.tex: /opt/tinytex/texmf-dist/tex/generic/tex-ini-files/pdftexconfig.tex
texmf.cnf: /opt/tinytex/texmf.cnf
texmf.cnf: /opt/tinytex/texmf-dist/web2c/texmf.cnf
updmap.cfg: /opt/tinytex/texmf-dist/web2c/updmap.cfg
============================= font map files =============================
kanjix.map: /opt/tinytex/texmf-var/fonts/map/dvipdfmx/updmap/kanjix.map
pdftex.map: /opt/tinytex/texmf-var/fonts/map/pdftex/updmap/pdftex.map
ps2pk.map: /opt/tinytex/texmf-var/fonts/map/dvips/updmap/ps2pk.map
psfonts.map: /opt/tinytex/texmf-var/fonts/map/dvips/updmap/psfonts.map
=========================== kpathsea variables ===========================
ENCFONTS=.:{{}/opt/tinytex/texmf-config,/opt/tinytex/texmf-var,/opt/tinytex/texmf-local,!!/opt/tinytex/texmf-local,!!/opt/tinytex/texmf-config,!!/opt/tinytex/texmf-var,!!/opt/tinytex/texmf-dist}/fonts/enc//
SYSTEXMF=/opt/tinytex/texmf-var:/opt/tinytex/texmf-local:/opt/tinytex/texmf-dist
TEXCONFIG={{}/opt/tinytex/texmf-config,/opt/tinytex/texmf-var,/opt/tinytex/texmf-local,!!/opt/tinytex/texmf-local,!!/opt/tinytex/texmf-config,!!/opt/tinytex/texmf-var,!!/opt/tinytex/texmf-dist}/dvips//
TEXFONTMAPS=.:{{}/opt/tinytex/texmf-config,/opt/tinytex/texmf-var,/opt/tinytex/texmf-local,!!/opt/tinytex/texmf-local,!!/opt/tinytex/texmf-config,!!/opt/tinytex/texmf-var,!!/opt/tinytex/texmf-dist}/fonts/map/{kpsewhich,pdftex,dvips,}//
TEXMF={{}/opt/tinytex/texmf-config,/opt/tinytex/texmf-var,/opt/tinytex/texmf-local,!!/opt/tinytex/texmf-local,!!/opt/tinytex/texmf-config,!!/opt/tinytex/texmf-var,!!/opt/tinytex/texmf-dist}
TEXMFCONFIG=/opt/tinytex/texmf-config
TEXMFDBS={!!/opt/tinytex/texmf-local,!!/opt/tinytex/texmf-config,!!/opt/tinytex/texmf-var,!!/opt/tinytex/texmf-dist}
TEXMFDIST=/opt/tinytex/texmf-dist
TEXMFHOME=/opt/tinytex/texmf-local
TEXMFLOCAL=/opt/tinytex/texmf-local
TEXMFMAIN=/opt/tinytex/texmf-dist
TEXMFSYSCONFIG=/opt/tinytex/texmf-config
TEXMFSYSVAR=/opt/tinytex/texmf-var
TEXMFVAR=/opt/tinytex/texmf-var
TEXPSHEADERS=.:{{}/opt/tinytex/texmf-config,/opt/tinytex/texmf-var,/opt/tinytex/texmf-local,!!/opt/tinytex/texmf-local,!!/opt/tinytex/texmf-config,!!/opt/tinytex/texmf-var,!!/opt/tinytex/texmf-dist}/{dvips,fonts/{enc,type1,type42,type3}}//
VARTEXFONTS=/opt/tinytex/texmf-var/fonts
WEB2C={{}/opt/tinytex/texmf-config,/opt/tinytex/texmf-var,/opt/tinytex/texmf-local,!!/opt/tinytex/texmf-local,!!/opt/tinytex/texmf-config,!!/opt/tinytex/texmf-var,!!/opt/tinytex/texmf-dist}/web2c
==== kpathsea variables from environment only (ok if no output here) ====
Goal
I want to install TinyTeX system-wide to be used by all users of an RStudio Server instance.
So far
To accomplish that goal, I've ran the following steps on a root terminal session on the RStudio Server:
With the above, non-root users (which are member of group
staff) can read the shared TinyTeX installation as well as generate the necessary symlinks for the TeX executables viatlmgr path addortinytex::tlmgr_path(action = "add"). Automatically installing additional TeX packages during knitting as well as manual installation viatlmgr install <PKG>ortinytex::tlmgr_install()also works for non-root users, but the latter prints some messages about failed permission changes to/opt/tinytex/tlpkg/texlive.tlpdblikeThe same message is also printed when a non-root user removes a package via
tlmgr remove <PKG>ortinytex::tlmgr_remove()(since in both cases thetexlive.tlpdbgets updated).The message is a bit cryptic to me sincechmod 420is not what/opt/tinytex/tlpkg/texlive.tlpdb)should have (and also not what it does have after the root user runs the same commands; instead it becomeschmod 644).420is the decimal representation of the octal644mask, as @norbusan pointed out.The output of
tinytex::tlmgr_conf()after the above is for any userOutput:
Remaining issues
Removing or installing additional TeX packages via the root account changes permissions of file
/opt/tinytex/tlpkg/texlive.tlpdbto not be group-writable anymore, rendering it impossible for non-root users to performtlmgr installortlmgr removeanymore. This is annoying but can be fixed by a simplechmod g+w /opt/tinytex/tlpkg/texlive.tlpdb. The changed group-write permission is retained when that file is updated during installation of additional packages by non-root users (since the subsequent permission modification totexlive.tlpdbfails in such case, see above) .Running
fmtutil-sys --all(also viatinytex::tlmgr_update(run_fmtutil = TRUE)) the first time as non-root user prints the following (error) messages:Subsequent runs don't emit these messages anymore and successfully copy the
.fmtfiles (but they becomechmod 644, i.e. not group-writable). I have no clue what exactly is going on here.Both of these issues seem to lie in the upstream TeX Live perl scripts and not in TinyTeX itself. Any ideas on how to fix them? The issues seem to be somewhat similar to #77 (which has eventually been fixed upstream).
Relevant documentation
By filing an issue to this repo, I promise that
xfun::session_info('tinytex'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('rstudio/tinytex').I understand that my issue may be closed if I don't fulfill my promises.