TeX Live and MacTeXWhy compiling LaTex examples require 'sudo'?

Information and discussion about TeX Live distribution for all platforms (Windows, Linux, Mac OS X) and the related MacTeX: installing, updating, configuring
Post Reply
erwann
Posts: 75
Joined: Thu Aug 25, 2016 2:24 am

Why compiling LaTex examples require 'sudo'?

Post by erwann »

Why are TexLive's doc files owned by root? Would it be a good idea to \chown them to a non root user?

Code: Select all

texmf-dist my-mac$ ls -ld doc/
drwxr-xr-x  49 root  staff  1666 Aug 24 19:31 doc/

$echo $PWD
/usr/local/texlive/2016/texmf-dist/doc/latex/lettre

$ pdflatex letex1.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
! I can't write on file `letex1.log'.

$sudo pdflatex letex1.tex
Password:
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
x_86 / Linux Mint 18.3 / texlive 2015.20160320-1ubuntu0.1 / TeXworks 0.5r1361 (Debian)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Why compiling LaTex examples require 'sudo'?

Post by Johannes_B »

Installing TeX Live in your home directory would have made the whole installation yours, no need for the super user.

Everything in /usr/ is protected to be accessed only with sudo rights. And that is a good thing. You should keep it that way ;-)

You should never create your own documents, no matter if LaTeX or anything else in /usr/. Always do it somewhere in your /home/ directory (or a subdir of it).
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply